Documentation ¶
Index ¶
- func LoadDirectory(fsys fs.FS, path string, cb func(r RegoFile) error) error
- func LoadOSFiles(paths []string, cb func(r RegoFile) error) error
- func LoadRegula(userOnly bool, cb func(r RegoFile) error) error
- func LoadTestInputs(paths []string, inputTypes []loader.InputType, cb func(r RegoFile) error) error
- func RegisterBuiltins()
- func RunREPL(options *RunREPLOptions) error
- func RunRules(options *RunRulesOptions) (*rego.Result, error)
- func RunTest(options *RunTestOptions) error
- func ScanView(options *ScanViewOptions) (*rego.Result, error)
- type EmbeddedInclude
- type RegoFile
- type RunREPLOptions
- type RunRulesOptions
- type RunTestOptions
- type ScanViewOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDirectory ¶ added in v1.3.0
func LoadTestInputs ¶
func RegisterBuiltins ¶
func RegisterBuiltins()
func RunREPL ¶
func RunREPL(options *RunREPLOptions) error
func RunRules ¶
func RunRules(options *RunRulesOptions) (*rego.Result, error)
RunRules runs regula and user-specified rules on loaded inputs
func RunTest ¶
func RunTest(options *RunTestOptions) error
Types ¶
type EmbeddedInclude ¶ added in v1.3.0
EmbeddedInclude can be used to load embedded rego code when regula is used as a library.
type RegoFile ¶
type RegoFile interface { Raw() []byte String() string AstModule() (*ast.Module, error) RegoModule() func(r *rego.Rego) Path() string }
func NewTestInput ¶
func NewTestInput(regulaInput loader.RegulaInput) (RegoFile, error)
type RunREPLOptions ¶
type RunRulesOptions ¶
type RunRulesOptions struct { Ctx context.Context UserOnly bool Includes []string EmbeddedIncludes []EmbeddedInclude Input []loader.RegulaInput }
RunRulesOptions is the set of options for RunRules
type RunTestOptions ¶
type ScanViewOptions ¶ added in v1.3.0
type ScanViewOptions struct { Ctx context.Context UserOnly bool Includes []string Input []loader.RegulaInput }
RunRulesOptions is the set of options for RunRules
Click to show internal directories.
Click to hide internal directories.