Documentation
¶
Overview ¶
Package repl implements a Read-Eval-Print-Loop (REPL) for interacting with the policy engine.
The REPL is typically used from the command line, however, it can also be used as a library.
Index ¶
Examples ¶
Constants ¶
View Source
const ( // BadArgsErr indicates bad arguments were provided to a built-in REPL // command. BadArgsErr string = "bad arguments" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type REPL ¶
type REPL struct {
// contains filtered or unexported fields
}
REPL represents an instance of the interactive shell.
func New ¶
func New(store storage.Store, historyPath string, output io.Writer, outputFormat string, errLimit int, banner string) *REPL
New returns a new instance of the REPL.
func (*REPL) DisableMultiLineBuffering ¶ added in v0.2.2
DisableMultiLineBuffering causes the REPL to not buffer lines when a parse error occurs. Instead, the error will be returned to the caller.
func (*REPL) DisableUndefinedOutput ¶ added in v0.2.2
DisableUndefinedOutput causes the REPL to not print any output when the query is undefined.
Click to show internal directories.
Click to hide internal directories.