Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/open-policy-agent/opa
/ functions
Functions
11,070 in github.com/open-policy-agent/opa
⨍
Functions
11,070
◇
Types & classes
1,577
↓ 1,861 callers
Method
Errorf
(f string, as ...any)
v1/storage/disk/disk.go:230
↓ 1,398 callers
Method
Run
(iter evalIterator)
v1/topdown/eval.go:181
↓ 1,101 callers
Method
Error
(fmt string, a ...any)
v1/logging/logging.go:33
↓ 1,087 callers
Method
Context
Context returns the JSON-context of the error
internal/gojsonschema/result.go:50
↓ 1,042 callers
Function
StringTerm
StringTerm creates a new Term with a String value.
v1/ast/term.go:945
↓ 942 callers
Function
VarTerm
VarTerm creates a new Term with a Variable value.
v1/ast/term.go:1151
↓ 857 callers
Method
New
(manager *Manager, config any)
v1/plugins/plugins.go:91
↓ 711 callers
Method
Equal
Equal returns true if the frame is equal to the other frame.
v1/debug/frame.go:33
↓ 677 callers
Method
String
IsGround returns true if this value is not a variable or contains no variables.
v1/ast/term.go:66
↓ 571 callers
Method
Contains
(*Term)
v1/ast/term.go:1811
↓ 493 callers
Function
NewTerm
NewTerm returns a new Term object.
v1/ast/term.go:321
↓ 483 callers
Function
Named
Named returns the passed type as a named type. Named types are only valid at the top level of built-in functions. Note that nested named types cause p
v1/types/types.go:104
↓ 477 callers
Function
InternedTerm
Interned returns a possibly interned term for the given scalar value. If the value is not interned, a new term is created for that value.
v1/ast/interning.go:206
↓ 470 callers
Method
Errorf
Errorf returns a new error value with a message formatted to include the location info (e.g., line, column, filename, etc.)
v1/ast/location/location.go:44
↓ 462 callers
Method
Description
Description returns the description of the error
internal/gojsonschema/result.go:54
↓ 364 callers
Function
MustParseRef
MustParseRef returns a parsed reference. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:125
↓ 341 callers
Function
MustParseTerm
MustParseTerm returns a parsed term. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:155
↓ 327 callers
Function
NewExpr
NewExpr returns a new Expr object.
v1/ast/policy.go:1165
↓ 310 callers
Function
NewBody
NewBody returns a new Body containing the given expressions. The indices of the immediate expressions will be reset.
v1/ast/policy.go:1042
↓ 301 callers
Method
Copy
()
v1/ast/term.go:1803
↓ 301 callers
Function
WithTempFS
WithTempFS creates a temporary directory structure and invokes f with the root directory path.
v1/util/test/tempfs.go:16
↓ 299 callers
Function
BooleanTerm
BooleanTerm creates a new Term with a Boolean value.
v1/ast/term.go:766
↓ 294 callers
Method
Set
(any)
v1/storage/inmem/txn.go:425
↓ 293 callers
Method
Get
(*Term)
v1/ast/term.go:2133
↓ 286 callers
Method
Add
(*Term)
v1/ast/term.go:1807
↓ 283 callers
Function
MustParseModule
MustParseModule returns a parsed module. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:71
↓ 271 callers
Method
Write
Write is called to modify a document referred to by path.
v1/storage/interface.go:31
↓ 270 callers
Method
OneShot
OneShot evaluates the line and prints the result. If an error occurs it is returned for the caller to display.
v1/repl/repl.go:256
↓ 268 callers
Function
MustParseBody
MustParseBody returns a parsed body. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:25
↓ 264 callers
Method
Compare
(other Value)
v1/ast/term.go:62
↓ 264 callers
Function
NewObject
NewObject returns a new Object type.
v1/types/types.go:358
↓ 263 callers
Function
NewFunction
NewFunction returns a new Function object of the given argument and result types.
v1/types/types.go:722
↓ 260 callers
Function
IntNumberTerm
IntNumberTerm creates a new Term with an integer Number value. For values between -1 and 512, returns a cached Term to reduce allocations.
v1/ast/term.go:834
↓ 254 callers
Function
NewCompiler
NewCompiler returns a new empty compiler.
v1/ast/compile.go:419
↓ 246 callers
Function
RefTerm
RefTerm creates a new Term with a Ref value.
v1/ast/term.go:1247
↓ 245 callers
Method
Loop
Loop will run until the user enters "exit", Ctrl+C, Ctrl+D, or an unexpected error occurs.
v1/repl/repl.go:171
↓ 236 callers
Method
WriteString
(string)
v1/topdown/sink.go:15
↓ 232 callers
Method
Close
()
v1/debug/trace.go:18
↓ 226 callers
Function
New
New returns a new Rego object.
v1/rego/rego.go:1414
↓ 220 callers
Function
Args
Args returns an argument list.
v1/types/types.go:697
↓ 212 callers
Function
RegisterBuiltinFunc
RegisterBuiltinFunc adds a new built-in function to the evaluation engine.
v1/topdown/builtins.go:91
↓ 207 callers
Method
Get
(ast.Ref)
v1/topdown/cache.go:39
↓ 205 callers
Function
Query
Query returns an argument that sets the Rego query.
v1/rego/rego.go:922
↓ 193 callers
Function
ArrayTerm
ArrayTerm creates a new Term with an Array value.
v1/ast/term.go:1564
↓ 186 callers
Function
NewDynamicProperty
NewDynamicProperty returns a new DynamicProperty object.
v1/types/types.go:332
↓ 184 callers
Method
Len
()
v1/ast/term.go:1802
↓ 183 callers
Method
Loc
()
v1/ast/policy.go:178
↓ 179 callers
Method
Stop
Stop a timer, and accumulate the delta (in nanoseconds) since it was last started.
v1/metrics/metrics.go:216
↓ 177 callers
Method
Put
(ast.Ref, ast.Value)
v1/topdown/cache.go:40
↓ 168 callers
Function
NewLocation
NewLocation returns a new Location object.
v1/ast/term.go:48
↓ 166 callers
Function
Item
Item is a helper for constructing an tuple containing two Terms representing a key/value pair in an Object.
v1/ast/term.go:2378
↓ 164 callers
Function
NewTransactionOrDie
NewTransactionOrDie is a helper function to create a new transaction. If the storage layer cannot create a new transaction, this function will panic.
v1/storage/storage.go:16
↓ 163 callers
Function
NewArray
NewArray returns a new Array type.
v1/types/types.go:203
↓ 159 callers
Function
MustParsePath
MustParsePath returns a new Path for s. If s cannot be parsed, this function will panic. This is mostly for test purposes.
v1/storage/path.go:136
↓ 152 callers
Function
MustParseModuleWithOpts
MustParseModuleWithOpts returns a parsed module. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:77
↓ 151 callers
Method
String
()
v1/topdown/sink.go:12
↓ 148 callers
Function
New
New returns a new Metrics object.
v1/metrics/metrics.go:74
↓ 147 callers
Function
assertEqual
(t *testing.T, expected, actual any)
internal/lcss/lcss_test.go:8
↓ 146 callers
Function
NumberTerm
NumberTerm creates a new Term with a Number value.
v1/ast/term.go:828
↓ 142 callers
Method
HasPrefix
HasPrefix returns true if the other ref is a prefix of this ref.
v1/ast/term.go:1382
↓ 140 callers
Method
Ref
Ref returns a ref referring to the document produced by this rule. If rule is not contained in a module, this function panics. The returned ref may co
v1/ast/policy.go:721
↓ 139 callers
Method
Read
Read is called to fetch a document referred to by path.
v1/storage/interface.go:28
↓ 137 callers
Method
Timer
(name string)
v1/metrics/metrics.go:54
↓ 134 callers
Method
Eval
(context.Context, *EvalContext, ast.Value)
v1/rego/plugins.go:24
↓ 133 callers
Method
New
()
internal/rego/opa/engine.go:31
↓ 133 callers
Method
Unmarshal
()
v1/ir/marshal.go:84
↓ 132 callers
Method
String
String returns a string representation of the error
internal/gojsonschema/result.go:68
↓ 131 callers
Method
Name
Name returns the human-readable name of the scope.
v1/debug/thread.go:295
↓ 131 callers
Method
Parse
(io.Reader)
cmd/internal/exec/parser.go:10
↓ 130 callers
Method
String
()
v1/types/types.go:46
↓ 129 callers
Function
CapabilitiesForThisVersion
CapabilitiesForThisVersion returns the capabilities of this version of OPA.
v1/ast/capabilities.go:147
↓ 129 callers
Method
Insert
(*Term, *Term)
v1/ast/term.go:2135
↓ 128 callers
Method
Log
(context.Context, *UpdateRequestV1)
v1/plugins/status/plugin.go:36
↓ 126 callers
Method
Len
()
v1/topdown/builtins/builtins.go:290
↓ 125 callers
Method
Compile
Compile should be called to compile ad-hoc queries. The return value is the compiled version of the query.
v1/ast/compile.go:357
↓ 125 callers
Method
Expr
Expr creates a new expression for the built-in with the given operands.
v1/ast/builtins.go:3642
↓ 125 callers
Method
Kind
()
internal/wasm/module/module.go:132
↓ 124 callers
Method
Decode
Decode deserializes bytes into target (must be pointer-to-struct).
e2e/proto/protoroundtrip/protoroundtrip.go:174
↓ 123 callers
Function
assertParseErrorContains
(t *testing.T, msg string, input string, expected string, opts ...ParserOptions)
v1/ast/parser_test.go:8324
↓ 121 callers
Function
NewQuery
NewQuery returns a new Query object that can be run.
v1/topdown/query.go:78
↓ 120 callers
Method
Failed
Failed returns true if a compilation error has been encountered.
v1/ast/compile.go:703
↓ 120 callers
Function
NewAny
NewAny returns a new Any type.
v1/types/types.go:553
↓ 117 callers
Method
Reset
(loc *location.Location)
v1/ast/parser.go:3068
↓ 116 callers
Method
Abort
Abort is called to cancel the transaction.
v1/storage/interface.go:43
↓ 116 callers
Function
MustUnmarshalJSON
MustUnmarshalJSON parse the JSON encoded data and returns the result. If the data cannot be decoded, this function will panic. This function is for t
v1/util/json.go:64
↓ 114 callers
Function
NewError
NewError returns a new Error object.
v1/ast/errors.go:123
↓ 114 callers
Method
write
write writes string s to the buffer.
v1/format/format.go:2405
↓ 112 callers
Function
NewObject
NewObject creates a new Object with t.
v1/ast/term.go:2151
↓ 111 callers
Method
Bytes
()
v1/download/download.go:433
↓ 110 callers
Method
Debug
(fmt string, a ...any)
v1/logging/logging.go:31
↓ 110 callers
Function
New
New creates a new Manager using config.
v1/plugins/plugins.go:537
↓ 109 callers
Function
UnmarshalJSON
UnmarshalJSON parses the JSON encoded data and stores the result in the value pointed to by x. This function is intended to be used in place of the s
v1/util/json.go:25
↓ 108 callers
Function
StringOperand
StringOperand returns x as [ast.String], or a descriptive error if the conversion fails.
v1/topdown/builtins/builtins.go:208
↓ 108 callers
Function
assertParseOneTerm
(t *testing.T, msg string, input string, correct *Term, opts ...ParserOptions)
v1/ast/parser_test.go:8470
↓ 106 callers
Function
Module
Module returns an argument that adds a Rego module.
v1/rego/rego.go:1039
↓ 106 callers
Method
WithCompiler
WithCompiler sets the compiler to use for the query.
v1/topdown/query.go:94
↓ 104 callers
Function
ObjectTerm
ObjectTerm creates a new Term with an Object value.
v1/ast/term.go:2165
↓ 104 callers
Method
Println
Println is invoked if the policy WASM code calls opa_println().
internal/wasm/sdk/internal/wasm/vm.go:529
↓ 104 callers
Method
WriteHeader
(s int)
v1/runtime/logging.go:249
↓ 99 callers
Method
Start
Start or resume a timer's time tracking.
v1/metrics/metrics.go:213
next →
1–100 of 11,070, ranked by callers