Versions in this module Expand all Collapse all v0 v0.13.2 Aug 14, 2019 v0.13.1 Aug 14, 2019 v0.13.0 Aug 6, 2019 Changes in this version + const CompileErr + const CompileErrorLimitDefault + const CompleteDoc + const ParseErr + const PartialObjectDoc + const PartialSetDoc + const RecursionErr + const TypeErr + const UnsafeVarErr + var Abs = &Builtin + var All = &Builtin + var And = &Builtin + var Any = &Builtin + var ArrayConcat = &Builtin + var ArraySlice = &Builtin + var Assign = &Builtin + var Base64Decode = &Builtin + var Base64Encode = &Builtin + var Base64UrlDecode = &Builtin + var Base64UrlEncode = &Builtin + var BuiltinMap map[string]*Builtin + var Builtins []*Builtin + var CastArray = &Builtin + var CastBoolean = &Builtin + var CastNull = &Builtin + var CastObject = &Builtin + var CastSet = &Builtin + var CastString = &Builtin + var Clock = &Builtin + var Concat = &Builtin + var Contains = &Builtin + var Count = &Builtin + var CryptoX509ParseCertificates = &Builtin + var Date = &Builtin + var DefaultBuiltins = [...]*Builtin + var DefaultRootDocument = VarTerm("data") + var DefaultRootRef = Ref + var Divide = &Builtin + var EndsWith = &Builtin + var Equal = &Builtin + var Equality = &Builtin + var FormatInt = &Builtin + var GlobMatch = &Builtin + var GlobQuoteMeta = &Builtin + var GlobsMatch = &Builtin + var GreaterThan = &Builtin + var GreaterThanEq = &Builtin + var HTTPSend = &Builtin + var IgnoreDuringPartialEval = []*Builtin + var IndexOf = &Builtin + var InputRootDocument = VarTerm("input") + var InputRootRef = Ref + var Intersection = &Builtin + var IsArray = &Builtin + var IsBoolean = &Builtin + var IsNull = &Builtin + var IsNumber = &Builtin + var IsObject = &Builtin + var IsSet = &Builtin + var IsString = &Builtin + var JSONMarshal = &Builtin + var JSONUnmarshal = &Builtin + var JWTDecode = &Builtin + var JWTDecodeVerify = &Builtin + var JWTEncodeSign = &Builtin + var JWTEncodeSignRaw = &Builtin + var JWTVerifyES256 = &Builtin + var JWTVerifyHS256 = &Builtin + var JWTVerifyPS256 = &Builtin + var JWTVerifyRS256 = &Builtin + var Keywords = [...]string + var LessThan = &Builtin + var LessThanEq = &Builtin + var Lower = &Builtin + var Max = &Builtin + var Min = &Builtin + var Minus = &Builtin + var Multiply = &Builtin + var NetCIDRContains = &Builtin + var NetCIDRIntersects = &Builtin + var NetCIDROverlap = &Builtin + var NotEqual = &Builtin + var NowNanos = &Builtin + var OPARuntime = &Builtin + var Or = &Builtin + var ParseDurationNanos = &Builtin + var ParseNanos = &Builtin + var ParseRFC3339Nanos = &Builtin + var Plus = &Builtin + var Product = &Builtin + var RegexFind = &Builtin + var RegexMatch = &Builtin + var RegexSplit = &Builtin + var RegexTemplateMatch = &Builtin + var RegoParseModule = &Builtin + var Rem = &Builtin + var Replace = &Builtin + var ReservedVars = NewVarSet(DefaultRootDocument.Value.(Var), InputRootDocument.Value.(Var)) + var RootDocumentNames = NewSet(DefaultRootDocument, InputRootDocument) + var RootDocumentRefs = NewSet(NewTerm(DefaultRootRef), NewTerm(InputRootRef)) + var Round = &Builtin + var SetDiff = &Builtin + var Sort = &Builtin + var Split = &Builtin + var Sprintf = &Builtin + var StartsWith = &Builtin + var Substring = &Builtin + var Sum = &Builtin + var SystemDocumentKey = String("system") + var ToNumber = &Builtin + var Trace = &Builtin + var Trim = &Builtin + var TypeNameBuiltin = &Builtin + var URLQueryDecode = &Builtin + var URLQueryEncode = &Builtin + var URLQueryEncodeObject = &Builtin + var Union = &Builtin + var Upper = &Builtin + var WalkBuiltin = &Builtin + var Weekday = &Builtin + var Wildcard = &Term + var WildcardPrefix = "$" + var YAMLMarshal = &Builtin + var YAMLUnmarshal = &Builtin + func Compare(a, b interface{}) int + func ContainsComprehensions(v interface{}) bool + func ContainsRefs(v interface{}) bool + func IsComprehension(x Value) bool + func IsConstant(v Value) bool + func IsError(code string, err error) bool + func IsKeyword(s string) bool + func IsScalar(v Value) bool + func IsUnknownValueErr(err error) bool + func IsValidImportPath(v Value) (err error) + func JSON(v Value) (interface{}, error) + func Parse(filename string, b []byte, opts ...Option) (interface{}, error) + func ParseFile(filename string, opts ...Option) (i interface{}, err error) + func ParseReader(filename string, r io.Reader, opts ...Option) (interface{}, error) + func ParseStatements(filename, input string) ([]Statement, []*Comment, error) + func Pretty(w io.Writer, x interface{}) + func RegisterBuiltin(b *Builtin) + func Transform(t Transformer, x interface{}) (interface{}, error) + func TransformComprehensions(x interface{}, f func(interface{}) (Value, error)) (interface{}, error) + func TransformRefs(x interface{}, f func(Ref) (Value, error)) (interface{}, error) + func TransformVars(x interface{}, f func(Var) (Value, error)) (interface{}, error) + func TypeName(x interface{}) string + func ValueToInterface(v Value, resolver Resolver) (interface{}, error) + func Walk(v Visitor, x interface{}) + func WalkBeforeAndAfter(v BeforeAndAfterVisitor, x interface{}) + func WalkBodies(x interface{}, f func(Body) bool) + func WalkClosures(x interface{}, f func(interface{}) bool) + func WalkExprs(x interface{}, f func(*Expr) bool) + func WalkNodes(x interface{}, f func(Node) bool) + func WalkRefs(x interface{}, f func(Ref) bool) + func WalkRules(x interface{}, f func(*Rule) bool) + func WalkTerms(x interface{}, f func(*Term) bool) + func WalkVars(x interface{}, f func(Var) bool) + func WalkWiths(x interface{}, f func(*With) bool) + type ArgErrDetail struct + Have []types.Type + Want []types.Type + func (d *ArgErrDetail) Lines() []string + type Args []*Term + func (a Args) Copy() Args + func (a Args) Loc() *Location + func (a Args) SetLoc(loc *Location) + func (a Args) String() string + func (a Args) Vars() VarSet + type Array []*Term + func (arr Array) Compare(other Value) int + func (arr Array) Copy() Array + func (arr Array) Equal(other Value) bool + func (arr Array) Find(path Ref) (Value, error) + func (arr Array) Get(pos *Term) *Term + func (arr Array) Hash() int + func (arr Array) IsGround() bool + func (arr Array) MarshalJSON() ([]byte, error) + func (arr Array) Sorted() Array + func (arr Array) String() string + type ArrayComprehension struct + Body Body + Term *Term + func (ac *ArrayComprehension) Compare(other Value) int + func (ac *ArrayComprehension) Copy() *ArrayComprehension + func (ac *ArrayComprehension) Equal(other Value) bool + func (ac *ArrayComprehension) Find(path Ref) (Value, error) + func (ac *ArrayComprehension) Hash() int + func (ac *ArrayComprehension) IsGround() bool + func (ac *ArrayComprehension) String() string + type BeforeAndAfterVisitor interface + After func(x interface{}) + Before func(x interface{}) + type Body []*Expr + func MustParseBody(input string) Body + func NewBody(exprs ...*Expr) Body + func ParseBody(input string) (Body, error) + func (body *Body) Append(expr *Expr) + func (body Body) Compare(other Body) int + func (body Body) Contains(x *Expr) bool + func (body Body) Copy() Body + func (body Body) Equal(other Body) bool + func (body Body) Hash() int + func (body Body) IsGround() bool + func (body Body) Loc() *Location + func (body Body) MarshalJSON() ([]byte, error) + func (body Body) Set(expr *Expr, pos int) + func (body Body) SetLoc(loc *Location) + func (body Body) String() string + func (body Body) Vars(params VarVisitorParams) VarSet + type Boolean bool + func (bol Boolean) Compare(other Value) int + func (bol Boolean) Equal(other Value) bool + func (bol Boolean) Find(path Ref) (Value, error) + func (bol Boolean) Hash() int + func (bol Boolean) IsGround() bool + func (bol Boolean) String() string + type Builtin struct + Decl *types.Function + Infix string + Name string + Relation bool + func (b *Builtin) Call(operands ...*Term) *Term + func (b *Builtin) Expr(operands ...*Term) *Expr + func (b *Builtin) IsTargetPos(i int) bool + func (b *Builtin) Ref() Ref + type Call []*Term + func (c Call) Compare(other Value) int + func (c Call) Copy() Call + func (c Call) Find(Ref) (Value, error) + func (c Call) Hash() int + func (c Call) IsGround() bool + func (c Call) MakeExpr(output *Term) *Expr + func (c Call) String() string + type Cloner interface + Clone func() interface{} + type Comment struct + Location *Location + Text []byte + func NewComment(text []byte) *Comment + func (c *Comment) Equal(other *Comment) bool + func (c *Comment) Loc() *Location + func (c *Comment) SetLoc(loc *Location) + func (c *Comment) String() string + type Compiler struct + Errors Errors + Graph *Graph + ModuleTree *ModuleTreeNode + Modules map[string]*Module + RuleTree *TreeNode + TypeEnv *TypeEnv + func CompileModules(modules map[string]string) (*Compiler, error) + func MustCompileModules(modules map[string]string) *Compiler + func NewCompiler() *Compiler + func (c *Compiler) Compile(modules map[string]*Module) + func (c *Compiler) Failed() bool + func (c *Compiler) GetArity(ref Ref) int + func (c *Compiler) GetRules(ref Ref) (rules []*Rule) + func (c *Compiler) GetRulesExact(ref Ref) (rules []*Rule) + func (c *Compiler) GetRulesForVirtualDocument(ref Ref) (rules []*Rule) + func (c *Compiler) GetRulesWithPrefix(ref Ref) (rules []*Rule) + func (c *Compiler) QueryCompiler() QueryCompiler + func (c *Compiler) RuleIndex(path Ref) RuleIndex + func (c *Compiler) SetErrorLimit(limit int) *Compiler + func (c *Compiler) WithMetrics(metrics metrics.Metrics) *Compiler + func (c *Compiler) WithModuleLoader(f ModuleLoader) *Compiler + func (c *Compiler) WithPathConflictsCheck(fn func([]string) (bool, error)) *Compiler + func (c *Compiler) WithStageAfter(after string, stage CompilerStageDefinition) *Compiler + func (c *Compiler) WithUnsafeBuiltins(unsafeBuiltins map[string]struct{}) *Compiler + type CompilerStage func(*Compiler) *Error + type CompilerStageDefinition struct + MetricName string + Name string + Stage CompilerStage + type DocKind int + type Error struct + Code string + Details ErrorDetails + Location *Location + Message string + func NewError(code string, loc *Location, f string, a ...interface{}) *Error + func (e *Error) Error() string + type ErrorDetails interface + Lines func() []string + type Errors []*Error + func CheckPathConflicts(c *Compiler, exists func([]string) (bool, error)) Errors + func (e Errors) Error() string + type Expr struct + Generated bool + Index int + Location *Location + Negated bool + Terms interface{} + With []*With + func MustParseExpr(input string) *Expr + func NewBuiltinExpr(terms ...*Term) *Expr + func NewExpr(terms interface{}) *Expr + func ParseExpr(input string) (*Expr, error) + func (expr *Expr) Compare(other *Expr) int + func (expr *Expr) Complement() *Expr + func (expr *Expr) Copy() *Expr + func (expr *Expr) Equal(other *Expr) bool + func (expr *Expr) Hash() int + func (expr *Expr) IncludeWith(target *Term, value *Term) *Expr + func (expr *Expr) IsAssignment() bool + func (expr *Expr) IsCall() bool + func (expr *Expr) IsEquality() bool + func (expr *Expr) IsGround() bool + func (expr *Expr) Loc() *Location + func (expr *Expr) NoWith() *Expr + func (expr *Expr) Operand(pos int) *Term + func (expr *Expr) Operands() []*Term + func (expr *Expr) Operator() Ref + func (expr *Expr) SetLoc(loc *Location) + func (expr *Expr) SetLocation(loc *Location) *Expr + func (expr *Expr) SetOperator(term *Term) *Expr + func (expr *Expr) String() string + func (expr *Expr) UnmarshalJSON(bs []byte) error + func (expr *Expr) Vars(params VarVisitorParams) VarSet + type GenericTransformer struct + func NewGenericTransformer(f func(x interface{}) (interface{}, error)) *GenericTransformer + func (t *GenericTransformer) Transform(x interface{}) (interface{}, error) + type GenericVisitor struct + func NewGenericVisitor(f func(x interface{}) bool) *GenericVisitor + func (vis *GenericVisitor) Visit(x interface{}) Visitor + type Graph struct + func NewGraph(modules map[string]*Module, list func(Ref) []*Rule) *Graph + func (g *Graph) Dependencies(x util.T) map[util.T]struct{} + func (g *Graph) Sort() (sorted []util.T, ok bool) + type GraphTraversal struct + func NewGraphTraversal(graph *Graph) *GraphTraversal + func (g *GraphTraversal) Edges(x util.T) []util.T + func (g *GraphTraversal) Visited(u util.T) bool + type Head struct + Args Args + Key *Term + Location *Location + Name Var + Value *Term + func NewHead(name Var, args ...*Term) *Head + func (head *Head) Compare(other *Head) int + func (head *Head) Copy() *Head + func (head *Head) DocKind() DocKind + func (head *Head) Equal(other *Head) bool + func (head *Head) Loc() *Location + func (head *Head) SetLoc(loc *Location) + func (head *Head) String() string + func (head *Head) Vars() VarSet + type Import struct + Alias Var + Location *Location + Path *Term + func MustParseImports(input string) []*Import + func ParseImports(input string) ([]*Import, error) + func (imp *Import) Compare(other *Import) int + func (imp *Import) Copy() *Import + func (imp *Import) Equal(other *Import) bool + func (imp *Import) Loc() *Location + func (imp *Import) Name() Var + func (imp *Import) SetLoc(loc *Location) + func (imp *Import) String() string + type IndexResult struct + Default *Rule + Else map[*Rule][]*Rule + Kind DocKind + Rules []*Rule + func NewIndexResult(kind DocKind) *IndexResult + func (ir *IndexResult) Empty() bool + type Location struct + Col int + File string + Row int + Text []byte + func NewLocation(text []byte, file string, row int, col int) *Location + func (loc *Location) Compare(other *Location) int + func (loc *Location) Equal(other *Location) bool + func (loc *Location) Errorf(f string, a ...interface{}) error + func (loc *Location) Format(f string, a ...interface{}) string + func (loc *Location) String() string + func (loc *Location) Wrapf(err error, f string, a ...interface{}) error + type Module struct + Comments []*Comment + Imports []*Import + Package *Package + Rules []*Rule + func MustParseModule(input string) *Module + func ParseModule(filename, input string) (*Module, error) + func (mod *Module) Compare(other *Module) int + func (mod *Module) Copy() *Module + func (mod *Module) Equal(other *Module) bool + func (mod *Module) RuleSet(name Var) RuleSet + func (mod *Module) String() string + type ModuleLoader func(resolved map[string]*Module) (parsed map[string]*Module, err error) + type ModuleTreeNode struct + Children map[Value]*ModuleTreeNode + Hide bool + Key Value + Modules []*Module + func NewModuleTree(mods map[string]*Module) *ModuleTreeNode + func (n *ModuleTreeNode) DepthFirst(f func(node *ModuleTreeNode) bool) + func (n *ModuleTreeNode) Size() int + type Node interface + Loc func() *Location + SetLoc func(*Location) + type Null struct + func (null Null) Compare(other Value) int + func (null Null) Equal(other Value) bool + func (null Null) Find(path Ref) (Value, error) + func (null Null) Hash() int + func (null Null) IsGround() bool + func (null Null) String() string + type Number json.Number + func (num Number) Compare(other Value) int + func (num Number) Equal(other Value) bool + func (num Number) Find(path Ref) (Value, error) + func (num Number) Float64() (float64, bool) + func (num Number) Hash() int + func (num Number) Int() (int, bool) + func (num Number) IsGround() bool + func (num Number) MarshalJSON() ([]byte, error) + func (num Number) String() string + type Object interface + Copy func() Object + Diff func(other Object) Object + Foreach func(func(*Term, *Term)) + Get func(*Term) *Term + Insert func(*Term, *Term) + Intersect func(other Object) [][3]*Term + Iter func(func(*Term, *Term) error) error + Keys func() []*Term + Len func() int + Map func(func(*Term, *Term) (*Term, *Term, error)) (Object, error) + Merge func(other Object) (Object, bool) + Until func(func(*Term, *Term) bool) bool + func NewObject(t ...[2]*Term) Object + type ObjectComprehension struct + Body Body + Key *Term + Value *Term + func (oc *ObjectComprehension) Compare(other Value) int + func (oc *ObjectComprehension) Copy() *ObjectComprehension + func (oc *ObjectComprehension) Equal(other Value) bool + func (oc *ObjectComprehension) Find(path Ref) (Value, error) + func (oc *ObjectComprehension) Hash() int + func (oc *ObjectComprehension) IsGround() bool + func (oc *ObjectComprehension) String() string + type Option func(*parser) Option + func AllowInvalidUTF8(b bool) Option + func CommentsOption() Option + func Debug(b bool) Option + func Entrypoint(ruleName string) Option + func GlobalStore(key string, value interface{}) Option + func InitState(key string, value interface{}) Option + func MaxExpressions(maxExprCnt uint64) Option + func Memoize(b bool) Option + func Recover(b bool) Option + func Statistics(stats *Stats, choiceNoMatch string) Option + type Package struct + Location *Location + Path Ref + func MustParsePackage(input string) *Package + func ParsePackage(input string) (*Package, error) + func (pkg *Package) Compare(other *Package) int + func (pkg *Package) Copy() *Package + func (pkg *Package) Equal(other *Package) bool + func (pkg *Package) Loc() *Location + func (pkg *Package) SetLoc(loc *Location) + func (pkg *Package) String() string + type QueryCompiler interface + Compile func(q Body) (Body, error) + RewrittenVars func() map[Var]Var + TypeEnv func() *TypeEnv + WithContext func(qctx *QueryContext) QueryCompiler + WithStageAfter func(after string, stage QueryCompilerStageDefinition) QueryCompiler + type QueryCompilerStage func(QueryCompiler, Body) (Body, error) + type QueryCompilerStageDefinition struct + MetricName string + Name string + Stage QueryCompilerStage + type QueryContext struct + Imports []*Import + Package *Package + func NewQueryContext() *QueryContext + func (qc *QueryContext) Copy() *QueryContext + func (qc *QueryContext) WithImports(imports []*Import) *QueryContext + func (qc *QueryContext) WithPackage(pkg *Package) *QueryContext + type QueryIterator func(map[Var]Value, Value) error + type Ref []*Term + func EmptyRef() Ref + func MustParseRef(input string) Ref + func ParseRef(input string) (Ref, error) + func PtrRef(head *Term, s string) (Ref, error) + func (ref Ref) Append(term *Term) Ref + func (ref Ref) Compare(other Value) int + func (ref Ref) Concat(terms []*Term) Ref + func (ref Ref) ConstantPrefix() Ref + func (ref Ref) Copy() Ref + func (ref Ref) Dynamic() int + func (ref Ref) Equal(other Value) bool + func (ref Ref) Extend(other Ref) Ref + func (ref Ref) Find(path Ref) (Value, error) + func (ref Ref) GroundPrefix() Ref + func (ref Ref) HasPrefix(other Ref) bool + func (ref Ref) Hash() int + func (ref Ref) Insert(x *Term, pos int) Ref + func (ref Ref) IsGround() bool + func (ref Ref) IsNested() bool + func (ref Ref) OutputVars() VarSet + func (ref Ref) Ptr() (string, error) + func (ref Ref) String() string + type RefErrInvalidDetail struct + Have types.Type + OneOf []Value + Pos int + Ref Ref + Want types.Type + func (r *RefErrInvalidDetail) Lines() []string + type RefErrUnsupportedDetail struct + Have types.Type + Pos int + Ref Ref + func (r *RefErrUnsupportedDetail) Lines() []string + type Resolver interface + Resolve func(ref Ref) (value interface{}, err error) + type Rule struct + Body Body + Default bool + Else *Rule + Head *Head + Location *Location + Module *Module + func MustParseRule(input string) *Rule + func ParseCompleteDocRuleFromEqExpr(module *Module, lhs, rhs *Term) (*Rule, error) + func ParsePartialObjectDocRuleFromEqExpr(module *Module, lhs, rhs *Term) (*Rule, error) + func ParsePartialSetDocRuleFromTerm(module *Module, term *Term) (*Rule, error) + func ParseRule(input string) (*Rule, error) + func ParseRuleFromBody(module *Module, body Body) (*Rule, error) + func ParseRuleFromCallEqExpr(module *Module, lhs, rhs *Term) (*Rule, error) + func ParseRuleFromCallExpr(module *Module, terms []*Term) (*Rule, error) + func ParseRuleFromExpr(module *Module, expr *Expr) (*Rule, error) + func (rule *Rule) Compare(other *Rule) int + func (rule *Rule) Copy() *Rule + func (rule *Rule) Equal(other *Rule) bool + func (rule *Rule) Loc() *Location + func (rule *Rule) Path() Ref + func (rule *Rule) SetLoc(loc *Location) + func (rule *Rule) String() string + type RuleIndex interface + Build func(rules []*Rule) (ok bool) + Lookup func(resolver ValueResolver) (result *IndexResult, err error) + type RuleSet []*Rule + func NewRuleSet(rules ...*Rule) RuleSet + func (rs *RuleSet) Add(rule *Rule) + func (rs RuleSet) Contains(rule *Rule) bool + func (rs RuleSet) Diff(other RuleSet) RuleSet + func (rs RuleSet) Equal(other RuleSet) bool + func (rs RuleSet) Merge(other RuleSet) RuleSet + func (rs RuleSet) String() string + type Set interface + Add func(*Term) + Contains func(*Term) bool + Copy func() Set + Diff func(Set) Set + Foreach func(func(*Term)) + Intersect func(Set) Set + Iter func(func(*Term) error) error + Len func() int + Map func(func(*Term) (*Term, error)) (Set, error) + Reduce func(*Term, func(*Term, *Term) (*Term, error)) (*Term, error) + Slice func() []*Term + Sorted func() Array + Union func(Set) Set + Until func(func(*Term) bool) bool + func NewSet(t ...*Term) Set + type SetComprehension struct + Body Body + Term *Term + func (sc *SetComprehension) Compare(other Value) int + func (sc *SetComprehension) Copy() *SetComprehension + func (sc *SetComprehension) Equal(other Value) bool + func (sc *SetComprehension) Find(path Ref) (Value, error) + func (sc *SetComprehension) Hash() int + func (sc *SetComprehension) IsGround() bool + func (sc *SetComprehension) String() string + type SomeDecl struct + Location *Location + Symbols []*Term + func (d *SomeDecl) Compare(other *SomeDecl) int + func (d *SomeDecl) Copy() *SomeDecl + func (d *SomeDecl) Hash() int + func (d *SomeDecl) Loc() *Location + func (d *SomeDecl) SetLoc(loc *Location) + func (d *SomeDecl) String() string + type Statement interface + func MustParseStatement(input string) Statement + func MustParseStatements(input string) []Statement + func ParseStatement(input string) (Statement, error) + type Stats struct + ChoiceAltCnt map[string]map[string]int + ExprCnt uint64 + type String string + func (str String) Compare(other Value) int + func (str String) Equal(other Value) bool + func (str String) Find(path Ref) (Value, error) + func (str String) Hash() int + func (str String) IsGround() bool + func (str String) String() string + type Term struct + Location *Location + Value Value + func ArrayComprehensionTerm(term *Term, body Body) *Term + func ArrayTerm(a ...*Term) *Term + func BooleanTerm(b bool) *Term + func CallTerm(terms ...*Term) *Term + func FloatNumberTerm(f float64) *Term + func IntNumberTerm(i int) *Term + func Item(key, value *Term) [2]*Term + func MustParseTerm(input string) *Term + func NewTerm(v Value) *Term + func NullTerm() *Term + func NumberTerm(n json.Number) *Term + func ObjectComprehensionTerm(key, value *Term, body Body) *Term + func ObjectTerm(o ...[2]*Term) *Term + func ParseTerm(input string) (*Term, error) + func RefTerm(r ...*Term) *Term + func SetComprehensionTerm(term *Term, body Body) *Term + func SetTerm(t ...*Term) *Term + func StringTerm(s string) *Term + func VarTerm(v string) *Term + func (term *Term) Copy() *Term + func (term *Term) Equal(other *Term) bool + func (term *Term) Get(name *Term) *Term + func (term *Term) Hash() int + func (term *Term) IsGround() bool + func (term *Term) Loc() *Location + func (term *Term) MarshalJSON() ([]byte, error) + func (term *Term) SetLoc(loc *Location) + func (term *Term) SetLocation(loc *Location) *Term + func (term *Term) String() string + func (term *Term) UnmarshalJSON(bs []byte) error + func (term *Term) Vars() VarSet + type Transformer interface + Transform func(v interface{}) (interface{}, error) + type TreeNode struct + Children map[Value]*TreeNode + Hide bool + Key Value + Values []util.T + func NewRuleTree(mtree *ModuleTreeNode) *TreeNode + func (n *TreeNode) Child(k Value) *TreeNode + func (n *TreeNode) DepthFirst(f func(node *TreeNode) bool) + func (n *TreeNode) Size() int + type TypeEnv struct + func NewTypeEnv() *TypeEnv + func (env *TypeEnv) Get(x interface{}) types.Type + type UnificationErrDetail struct + Left types.Type + Right types.Type + func (a *UnificationErrDetail) Lines() []string + type UnknownValueErr struct + func (UnknownValueErr) Error() string + type Value interface + Compare func(other Value) int + Find func(path Ref) (Value, error) + Hash func() int + IsGround func() bool + String func() string + func InterfaceToValue(x interface{}) (Value, error) + func MustInterfaceToValue(x interface{}) Value + type ValueMap struct + func NewValueMap() *ValueMap + func (vs *ValueMap) Copy() *ValueMap + func (vs *ValueMap) Delete(k Value) + func (vs *ValueMap) Equal(other *ValueMap) bool + func (vs *ValueMap) Get(k Value) Value + func (vs *ValueMap) Hash() int + func (vs *ValueMap) Iter(iter func(Value, Value) bool) bool + func (vs *ValueMap) Len() int + func (vs *ValueMap) Put(k, v Value) + func (vs *ValueMap) String() string + type ValueResolver interface + Resolve func(ref Ref) (value Value, err error) + type Var string + func (v Var) Compare(other Value) int + func (v Var) Equal(other Value) bool + func (v Var) Find(path Ref) (Value, error) + func (v Var) Hash() int + func (v Var) IsGenerated() bool + func (v Var) IsGround() bool + func (v Var) IsWildcard() bool + func (v Var) String() string + type VarSet map[Var]struct + func NewVarSet(vs ...Var) VarSet + func Unify(safe VarSet, a *Term, b *Term) VarSet + func (s VarSet) Add(v Var) + func (s VarSet) Contains(v Var) bool + func (s VarSet) Copy() VarSet + func (s VarSet) Diff(vs VarSet) VarSet + func (s VarSet) Equal(vs VarSet) bool + func (s VarSet) Intersect(vs VarSet) VarSet + func (s VarSet) Sorted() []Var + func (s VarSet) String() string + func (s VarSet) Update(vs VarSet) + type VarVisitor struct + func NewVarVisitor() *VarVisitor + func (vis *VarVisitor) Vars() VarSet + func (vis *VarVisitor) Visit(v interface{}) Visitor + func (vis *VarVisitor) WithParams(params VarVisitorParams) *VarVisitor + type VarVisitorParams struct + SkipClosures bool + SkipObjectKeys bool + SkipRefCallHead bool + SkipRefHead bool + SkipSets bool + SkipWithTarget bool + type Visitor interface + Visit func(v interface{}) (w Visitor) + type With struct + Location *Location + Target *Term + Value *Term + func (w *With) Compare(other *With) int + func (w *With) Copy() *With + func (w *With) Equal(other *With) bool + func (w *With) Loc() *Location + func (w *With) SetLoc(loc *Location) + func (w *With) SetLocation(loc *Location) *With + func (w *With) String() string + func (w With) Hash() int