Documentation
¶
Index ¶
- 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
- type RegoFile
- type RunREPLOptions
- type RunRulesOptions
- type RunTestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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
Input []loader.RegulaInput
}
RunRulesOptions is the set of options for RunRules
Click to show internal directories.
Click to hide internal directories.