Documentation ¶
Index ¶
- type Engine
- func (e *Engine) Check(ctx context.Context, configs map[string]interface{}, namespace string) ([]output.CheckResult, error)
- func (e *Engine) CheckCombined(ctx context.Context, configs map[string]interface{}, namespace string) (output.CheckResult, error)
- func (e *Engine) Compiler() *ast.Compiler
- func (e *Engine) Documents() map[string]string
- func (e *Engine) EnableTracing()
- func (e *Engine) Modules() map[string]*ast.Module
- func (e *Engine) Namespaces() []string
- func (e *Engine) Policies() map[string]string
- func (e *Engine) Runtime() *ast.Term
- func (e *Engine) ShowBuiltinErrors()
- func (e *Engine) Store() storage.Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶ added in v0.21.0
type Engine struct {
// contains filtered or unexported fields
}
Engine represents the policy engine.
func LoadWithData ¶ added in v0.22.0
func LoadWithData(policyPaths []string, dataPaths []string, capabilities string, strict bool) (*Engine, error)
LoadWithData returns an Engine after loading all of the specified policies and data paths.
func (*Engine) Check ¶ added in v0.22.0
func (e *Engine) Check(ctx context.Context, configs map[string]interface{}, namespace string) ([]output.CheckResult, error)
Check executes all of the loaded policies against the input and returns the results.
func (*Engine) CheckCombined ¶ added in v0.22.0
func (e *Engine) CheckCombined(ctx context.Context, configs map[string]interface{}, namespace string) (output.CheckResult, error)
CheckCombined combines the input and evaluates the policies against the combined result.
func (*Engine) Documents ¶ added in v0.22.0
Documents returns all of the documents loaded into the engine. The result is a map where the key is the filepath of the document and its value is the raw contents of the loaded document.
func (*Engine) EnableTracing ¶ added in v0.25.0
func (e *Engine) EnableTracing()
func (*Engine) Namespaces ¶ added in v0.22.0
Namespaces returns all of the namespaces in the engine.
func (*Engine) Policies ¶ added in v0.22.0
Policies returns all of the policies loaded into the engine. The result is a map where the key is the filepath of the policy and its value is the raw contents of the loaded policy.
func (*Engine) ShowBuiltinErrors ¶ added in v0.46.0
func (e *Engine) ShowBuiltinErrors()