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
↓ 31 callers
Method
GetByValue
GetByValue returns the type of v.
v1/ast/env.go:47
↓ 31 callers
Function
New
New returns a new discovery plugin.
v1/plugins/discovery/discovery.go:105
↓ 31 callers
Function
NewInterQueryValueCache
(_ context.Context, config *Config)
v1/topdown/cache/cache.go:530
↓ 31 callers
Function
ParseCachingConfig
ParseCachingConfig returns the config for the inter-query cache.
v1/topdown/cache/cache.go:152
↓ 31 callers
Function
WriteVarUint32
WriteVarUint32 writes u to w.
internal/leb128/leb128.go:110
↓ 30 callers
Function
NewFromObject
NewFromObject returns a new in-memory store from the supplied data object.
v1/storage/inmem/inmem.go:63
↓ 30 callers
Method
UpdatePluginStatus
UpdatePluginStatus updates a named plugins status. Any registered listeners will be called with a copy of the new state of all plugins.
v1/plugins/plugins.go:1066
↓ 30 callers
Function
ValueName
ValueName returns a human readable name for the AST Value type. This is preferrable over calling TypeName when the argument is known to be a Value, as
v1/ast/strings.go:23
↓ 30 callers
Method
Vars
()
v1/ast/compile.go:4773
↓ 30 callers
Method
WithEnablePrintStatements
WithEnablePrintStatements enables print statements in queries compiled with the QueryCompiler.
v1/ast/compile.go:369
↓ 30 callers
Method
WithParams
WithParams sets the parameters in params on vis.
v1/ast/visit.go:802
↓ 30 callers
Method
WithTracer
WithTracer adds a query tracer to use during evaluation. This is optional. Deprecated: Use WithQueryTracer instead.
v1/topdown/query.go:129
↓ 30 callers
Method
WriteByte
(byte)
v1/topdown/sink.go:14
↓ 30 callers
Function
verifyReadBundleNames
(tb testing.TB, store storage.Store, txn storage.Transaction, expected ...string)
v1/bundle/store_test.go:4504
↓ 29 callers
Function
FloatNumberTerm
FloatNumberTerm creates a new Term with a floating point Number value.
v1/ast/term.go:844
↓ 29 callers
Method
GroundPrefix
GroundPrefix returns the ground portion of the ref starting from the head. By definition, the head of the reference is always ground.
v1/ast/term.go:1418
↓ 29 callers
Function
MustParseStatement
MustParseStatement returns exactly one statement. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:107
↓ 29 callers
Function
ReadOne
ReadOne is a convenience function to read a single value from the provided Store. It will create a new Transaction to perform the read with, and clean
v1/storage/storage.go:27
↓ 29 callers
Method
WithCallback
WithCallback registers a function f to be called when download updates occur.
v1/download/download.go:96
↓ 29 callers
Function
assertErr
(expected string, actual error, t *testing.T)
v1/plugins/rest/aws_test.go:53
↓ 29 callers
Function
assertToString
(t *testing.T, val Value, expected string)
v1/ast/term_test.go:1439
↓ 29 callers
Method
edgeLabeled
edgeLabeled writes a directed edge with a text label.
v1/ast/mermaid.go:79
↓ 29 callers
Method
instrumentHandler
(handler func(http.ResponseWriter, *http.Request), label string)
v1/server/server.go:945
↓ 29 callers
Method
oneShot
(ctx context.Context)
v1/download/download.go:264
↓ 28 callers
Method
Add
Add includes a new string into the tree. We start from the root and increment `used` of all the nodes we visit.
internal/lcss/lcss.go:117
↓ 28 callers
Method
Lookup
Lookup searches the index for rules that will match the provided resolver. If the resolver returns an error, it is returned via err.
v1/ast/index.go:25
↓ 28 callers
Function
NewCustomReader
NewCustomReader returns a new Reader configured to use the specified DirectoryLoader.
v1/bundle/bundle.go:511
↓ 28 callers
Function
NewFromObjectWithOpts
NewFromObjectWithOpts returns a new in-memory store from the supplied data object, with the options passed.
v1/storage/inmem/inmem.go:69
↓ 28 callers
Method
Warn
(fmt string, a ...any)
v1/logging/logging.go:34
↓ 28 callers
Method
WithEntrypoints
WithEntrypoints sets the policy entrypoints on the compiler. Entrypoints tell the compiler what rules to expect and where optimizations can be targete
v1/compile/compile.go:134
↓ 28 callers
Method
WithMetrics
(metrics.Metrics)
v1/plugins/logs/plugin.go:470
↓ 28 callers
Function
newLogicalAnd
(lhs, rhs string)
v1/ast/policy_logical_test.go:10
↓ 28 callers
Function
newTestCommandParams
()
cmd/test.go:71
↓ 28 callers
Function
newTestFixture
(t *testing.T, opts ...testFixtureOptions)
v1/plugins/logs/plugin_test.go:3054
↓ 27 callers
Method
GetCache
(name string)
v1/topdown/cache/cache.go:526
↓ 27 callers
Function
NewAPIServerTestParams
NewAPIServerTestParams creates a new set of runtime.Params with enough default values filled in to start the server. Options can/should be customized
v1/test/e2e/testing.go:43
↓ 27 callers
Method
Reconfigure
(ctx context.Context, config any)
v1/plugins/plugins.go:109
↓ 27 callers
Method
Trigger
(context.Context)
v1/plugins/bundle/plugin.go:53
↓ 27 callers
Method
errorf
(loc *location.Location, f string, a ...any)
v1/ast/parser.go:2853
↓ 27 callers
Function
newReqUnversioned
(method, path, body string)
v1/server/server_test.go:5702
↓ 27 callers
Method
stop
stop the testServer. This should only be done at the end of a test!
v1/plugins/logs/plugin_test.go:3768
↓ 27 callers
Function
verifyResultRead
(tb testing.TB, store storage.Store, expected string)
v1/bundle/store_test.go:4567
↓ 26 callers
Method
Delete
(key ast.Value)
v1/topdown/cache/cache.go:254
↓ 26 callers
Method
Flush
()
v1/plugins/logs/plugin.go:472
↓ 26 callers
Method
IsValid
(value string)
internal/providers/aws/v4/header_rules.go:14
↓ 26 callers
Function
Keys
Keys returns a slice of keys from any map.
v1/util/maps.go:9
↓ 26 callers
Method
Map
(func(*Term) (*Term, error))
v1/ast/term.go:1812
↓ 26 callers
Function
MustCompileModules
MustCompileModules compiles a set of Rego modules represented as strings. If the compilation process fails, this function panics.
v1/ast/compilehelper.go:49
↓ 26 callers
Function
MustParsePackage
MustParsePackage returns a Package. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:87
↓ 26 callers
Method
Operator
()
v1/ast/term.go:3088
↓ 26 callers
Method
Push
(*EventV1)
v1/plugins/logs/plugin.go:468
↓ 26 callers
Function
ReadVarUint32
Copied rom http://dwarfstd.org/doc/Dwarf3.pdf. ReadVarUint32 tries to read a uint32 from r.
internal/leb128/leb128.go:51
↓ 26 callers
Method
Sorted
()
v1/ast/term.go:1814
↓ 26 callers
Function
unpack
unpack takes flat map[string]any where nested keys are dot-separated, and returns a "unpacked" map[string]any with proper nesting.
v1/bundle/store_test.go:4670
↓ 25 callers
Function
KeysSorted
KeysSorted returns a slice of keys from any map, sorted in ascending order.
v1/util/maps.go:18
↓ 25 callers
Method
LookupOrInsert
TODO: Collapse rules with overlapping extent to same node(?)
internal/planner/rules.go:205
↓ 25 callers
Function
Metrics
Metrics returns an argument that sets the metrics collection.
v1/rego/rego.go:1149
↓ 25 callers
Function
New
New returns a new error with the passed code
internal/wasm/sdk/opa/errors/errors.go:39
↓ 25 callers
Method
WithLazyLoadingMode
WithLazyLoadingMode sets the bundle loading mode. If true, bundles will be read in lazy mode. In this mode, data files in the bundle will not be deser
v1/bundle/bundle.go:601
↓ 25 callers
Function
benchMain
(args []string, params benchmarkCommandParams, w io.Writer, stderr io.Writer, r benchRunner)
cmd/bench.go:156
↓ 25 callers
Method
biunify
(a, b *ast.Term, b1, b2 *bindings, iter unifyIterator)
v1/topdown/eval.go:1134
↓ 25 callers
Method
error
(loc *location.Location, reason string)
v1/ast/parser.go:2835
↓ 25 callers
Method
executeRequest
(req *http.Request, code int, resp string, opts ...executeOpts)
v1/server/server_test.go:5617
↓ 25 callers
Function
pointTo
(v T)
v1/plugins/bundle/plugin_test.go:2829
↓ 25 callers
Function
ref
(r string)
internal/planner/planner_test.go:779
↓ 25 callers
Method
start
()
v1/plugins/rest/rest_test.go:2391
↓ 25 callers
Method
stop
()
v1/plugins/rest/rest_test.go:2407
↓ 25 callers
Function
transformTerm
(t Transformer, term *Term)
v1/ast/transform.go:420
↓ 24 callers
Method
CheckBody
CheckBody runs type checking on the body and returns a TypeEnv if no errors are found. The resulting TypeEnv wraps the provided one. The resulting Typ
v1/ast/check.go:118
↓ 24 callers
Method
Generate
(other *Term)
v1/ast/compile.go:5325
↓ 24 callers
Method
IsCall
IsCall returns true if this expression calls a function.
v1/ast/policy.go:1396
↓ 24 callers
Method
IsZero
IsZero returns true if the TriggerEvent indicates no changes occurred. This function is primarily for test purposes.
v1/storage/interface.go:205
↓ 24 callers
Method
Put
Put inserts a raw schema into the set.
v1/ast/schema.go:27
↓ 24 callers
Function
WalkRules
WalkRules calls the function f on all rules under x. If the function f returns true, AST nodes under the last node will not be visited.
v1/ast/visit.go:288
↓ 24 callers
Function
newLogicalOr
(lhs, rhs string)
v1/ast/policy_logical_test.go:17
↓ 23 callers
Method
IsEquality
IsEquality returns true if this is an equality expression.
v1/ast/policy.go:1386
↓ 23 callers
Function
New
New returns a new Server.
v1/server/server.go:185
↓ 23 callers
Method
NewClient
NewClient is called once per Client instance and the result is cached. Implementations MUST NOT perform per-request operations here. All per-request a
v1/plugins/rest/rest.go:46
↓ 23 callers
Function
ParsedModule
ParsedModule returns an argument that adds a parsed Rego module. If a string module with the same filename name is added, it will override the parsed
v1/rego/rego.go:1051
↓ 23 callers
Function
TemplateStringTerm
(multiLine bool, parts ...Node)
v1/ast/term.go:1094
↓ 23 callers
Method
Text
(offset, end int)
v1/ast/parser.go:133
↓ 23 callers
Method
WithTarget
WithTarget sets the output target type to use.
v1/compile/compile.go:156
↓ 23 callers
Function
WriteOne
WriteOne is a convenience function to write a single value to the provided Store. It will create a new Transaction to perform the write with, and clea
v1/storage/storage.go:40
↓ 23 callers
Function
assertLocationText
(t *testing.T, expected string, actual *Location)
v1/ast/parser_test.go:8298
↓ 23 callers
Method
credentials
(ctx context.Context)
v1/plugins/rest/aws.go:676
↓ 23 callers
Method
in
(s string)
v1/topdown/durationparser/duration_parser.go:806
↓ 23 callers
Function
mustMarshal
(t *testing.T, v any)
internal/genjsonschema/genjsonschema_test.go:10
↓ 23 callers
Function
opaTest
(args []string, testParams testCommandParams)
cmd/test.go:97
↓ 23 callers
Method
out
(s string)
v1/topdown/durationparser/duration_parser.go:812
↓ 22 callers
Method
Field
Field returns the field name without the root context i.e. firstName or person.firstName instead of (root).firstName or (root).person.firstName
internal/gojsonschema/result.go:42
↓ 22 callers
Method
Grow
(int)
v1/topdown/sink.go:13
↓ 22 callers
Function
LazyObject
(blob map[string]any)
v1/ast/term.go:2169
↓ 22 callers
Method
Logger
Logger returns the slog.Handler implementation provided by this plugin.
v1/plugins/plugins.go:122
↓ 22 callers
Method
Plugin
Plugin returns the plugin registered with name or nil if name is not found.
v1/plugins/plugins.go:728
↓ 22 callers
Method
Put
Put inserts a key k into the map with value v.
v1/ast/map.go:88
↓ 22 callers
Method
Serve
Serve will start a new REST API server and listen for requests. This will block until either: an error occurs, the context is canceled, or a SIGTERM o
v1/runtime/runtime.go:629
↓ 22 callers
Method
SetOutput
SetOutput sets the underlying logrus output.
v1/logging/logging.go:82
↓ 22 callers
Method
Upload
(context.Context)
v1/plugins/logs/plugin.go:469
↓ 22 callers
Function
dobuild
(params buildParams, args []string)
cmd/build.go:289
↓ 22 callers
Function
getFakeTraceEvents
()
v1/tester/reporter_test.go:19
← previous
next →
301–400 of 11,070, ranked by callers