MCPcopy Create free account

hub / github.com/open-policy-agent/opa / functions

Functions11,070 in github.com/open-policy-agent/opa

↓ 99 callersMethodappendStmt
(s ir.Stmt)
internal/planner/planner.go:2363
↓ 96 callersMethodElem
Elem returns the element i of arr.
v1/ast/term.go:1718
↓ 93 callersMethodPrepareForEval
(context.Context, *ir.Policy, ...PrepareOption)
v1/rego/plugins.go:20
↓ 91 callersMethodInit
Init returns an initialized [ExternalRuleIndex]. A `Ref` is provided so we know which package we're preparing if multiple Refs are external.
v1/ast/external_source.go:20
↓ 90 callersMethodInt
Int returns the int representation of num if possible.
v1/ast/term.go:888
↓ 89 callersMethodSetLocation
(index, row, col int, file, text string)
v1/ir/ir.go:87
↓ 89 callersFunctionassertParseRule
(t *testing.T, msg string, input string, correct *Rule, opts ...ParserOptions)
v1/ast/parser_test.go:8482
↓ 88 callersFunctionInterfaceToValue
InterfaceToValue converts a native Go value x to a Value.
v1/ast/term.go:72
↓ 88 callersMethodWithStore
WithStore sets the store to use for the query.
v1/topdown/query.go:100
↓ 87 callersMethodHeader
()
v1/runtime/logging.go:237
↓ 87 callersFunctionParseModuleWithOpts
ParseModuleWithOpts returns a parsed Module object, and has an additional input ParserOptions For details on Module objects and their fields, see poli
v1/ast/parser_ext.go:482
↓ 86 callersFunctionNewArray
NewArray creates an Array with the terms provided. The array will use the provided term slice.
v1/ast/term.go:1570
↓ 85 callersMethodDo
(any)
v1/ast/index.go:664
↓ 85 callersFunctionUnmarshal
Unmarshal decodes a YAML, JSON or JSON extension value into the specified type.
v1/util/json.go:178
↓ 83 callersMethodDiff
(Set)
v1/ast/term.go:1804
↓ 82 callersMethodCompile
Compile runs the compilation process on the input modules. The compiled version of the modules and associated data structures are stored on the compil
v1/ast/compile.go:670
↓ 82 callersFunctionmodule
FIXME(v1-test-refactor): In OPA 1.0, a call to here can be replaced with a call to MustParseModule.
v1/ast/compile_test.go:12729
↓ 79 callersFunctionNewSet
NewSet returns a new Set containing t.
v1/ast/term.go:1819
↓ 79 callersFunctionNewStaticProperty
NewStaticProperty returns a new StaticProperty object.
v1/types/types.go:310
↓ 78 callersMethodInsert
(key ast.Value, value InterQueryCacheValue)
v1/topdown/cache/cache.go:252
↓ 78 callersMethodStart
(context.Context)
v1/plugins/bundle/plugin.go:51
↓ 78 callersFunctionTxn
Txn is a convenience function that executes f inside a new transaction opened on the store. If the function returns an error, the transaction is abort
v1/storage/storage.go:95
↓ 77 callersMethodPrintf
Printf prints, with a short file:line-number prefix
internal/debug/debug.go:11
↓ 77 callersMethodWithTransaction
WithTransaction sets the transaction to use for the query. All queries should be performed over a consistent snapshot of the storage layer.
v1/topdown/query.go:107
↓ 76 callersFunctionMustParseExpr
MustParseExpr returns a parsed expression. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:41
↓ 74 callersMethodCall
Call creates a new term for the built-in with the given operands.
v1/ast/builtins.go:3654
↓ 74 callersFunctionmodules
(ms ...string)
v1/ast/compile_test.go:12715
↓ 73 callersMethodHash
Find returns value referred to by path or an error if path is not found.
v1/ast/term.go:64
↓ 73 callersMethodoneShot
(ctx context.Context, name string, u download.Update)
v1/plugins/bundle/plugin.go:478
↓ 72 callersMethodCommit
Commit is called to finish the transaction. If Commit returns an error, the transaction must be automatically aborted by the Store implementation.
v1/storage/interface.go:35
↓ 72 callersMethodWithFields
(map[string]any)
v1/logging/logging.go:36
↓ 72 callersFunctionassertEq
quick and dirty assertions
v1/plugins/rest/aws_test.go:39
↓ 71 callersFunctionNewJSONDecoder
NewJSONDecoder returns a new decoder that reads from r. This function is intended to be used in place of the standard [json.NewDecoder] when [json.Nu
v1/util/json.go:54
↓ 71 callersFunctionNewNoOpLogger
NewNoOpLogger instantiates new NoOpLogger
v1/logging/logging.go:188
↓ 70 callersMethodRegister
(context.Context, Transaction, TriggerConfig)
v1/storage/interface.go:235
↓ 70 callersMethodServeHTTP
(w http.ResponseWriter, _ *http.Request)
v1/server/server_test.go:6975
↓ 69 callersFunctionMustWriteTarGz
MustWriteTarGz writes the list of file names and content into a tarball. Paths are prefixed with "/".
internal/file/archive/tarball.go:59
↓ 68 callersFunctionCapabilitiesRegoVersion
(regoVersion RegoVersion)
v1/ast/capabilities.go:125
↓ 68 callersMethodValue
()
v1/metrics/metrics.go:210
↓ 67 callersMethodInfo
(fmt string, a ...any)
v1/logging/logging.go:32
↓ 67 callersMethodWithCancel
WithCancel sets the cancellation object to use for the query. Set this if you need to abort queries based on a deadline. This is optional.
v1/topdown/query.go:114
↓ 66 callersMethodIsGround
Returns hash code of the value.
v1/ast/term.go:65
↓ 66 callersMethodscan
()
v1/ast/parser.go:2900
↓ 65 callersFunctionNewFileLoader
NewFileLoader returns a new FileLoader instance.
v1/loader/loader.go:113
↓ 64 callersMethodAll
()
v1/metrics/metrics.go:57
↓ 64 callersMethodBuild
Build tries to construct an index for the given rules. If the index was constructed, it returns true, otherwise false.
v1/ast/index.go:21
↓ 64 callersFunctionSetTerm
SetTerm returns a new Term representing a set containing terms t.
v1/ast/term.go:1847
↓ 64 callersMethodWalk
Walk iterates the AST by calling the function f on the [VarVisitor] before recursing. Contrary to the deprecated [Walk] function, this does not requir
v1/ast/visit.go:921
↓ 63 callersMethodSlice
()
v1/ast/term.go:1815
↓ 62 callersFunctionNew
New returns a new Downloader that can be started.
v1/download/download.go:83
↓ 62 callersMethodWriteFile
(path string, bs []byte)
internal/file/archive/tarball.go:29
↓ 62 callersFunctionnewFixture
(t *testing.T, opts ...any)
v1/server/server_test.go:5448
↓ 61 callersMethodEncode
Encode attempts to write an encoded event to the current chunk. A chunk is returned when it reaches the uncompressed limit, the uncompressed limit is
v1/plugins/logs/encoder.go:103
↓ 61 callersFunctionErrorAuto
ErrorAuto writes a response with status and code set automatically based on the type of err.
v1/server/writer/writer.go:27
↓ 61 callersMethodfunction
(name string)
internal/compiler/wasm/wasm.go:1729
↓ 60 callersFunctionNullTerm
NullTerm creates a new Term with a Null value.
v1/ast/term.go:717
↓ 60 callersMethodOperand
Operand returns the term at the zero-based pos. If the expr does not include at least pos+1 terms, this function returns nil.
v1/ast/policy.go:1458
↓ 60 callersFunctionnewRepl
(store storage.Store, buffer *bytes.Buffer)
v1/repl/repl_test.go:3381
↓ 59 callersMethodStop
(context.Context)
v1/plugins/bundle/plugin.go:52
↓ 59 callersMethodStringLength
()
v1/ast/string_length.go:14
↓ 59 callersMethodUpsertPolicy
(context.Context, Transaction, string, []byte)
v1/storage/interface.go:154
↓ 59 callersFunctionassertParseOneExpr
(t *testing.T, msg string, input string, correct *Expr, opts ...ParserOptions)
v1/ast/parser_test.go:8449
↓ 59 callersFunctionensurePluginState
(t *testing.T, p *Plugin, state plugins.State)
v1/plugins/bundle/plugin_test.go:7806
↓ 59 callersMethodnewLocal
()
internal/planner/planner.go:2392
↓ 58 callersFunctionCompare
Compare returns -1, 0, 1 based on comparison between a and b.
v1/types/types.go:885
↓ 58 callersMethodCounter
(name string)
v1/metrics/metrics.go:56
↓ 58 callersFunctionnewReqV1
(method string, path string, body string)
v1/server/server_test.go:5690
↓ 57 callersMethodFind
Compare returns <0, 0, or >0 if this Value is less than, equal to, or greater than other, respectively.
v1/ast/term.go:63
↓ 57 callersFunctionMustParseRule
MustParseRule returns a parsed rule. If an error occurs during parsing, panic.
v1/ast/parser_ext.go:135
↓ 57 callersFunctionNew
New returns a new disk-based store based on the provided options.
v1/storage/disk/disk.go:138
↓ 57 callersFunctionnewEvalCommandParams
()
cmd/eval.go:93
↓ 57 callersFunctionop
(v ir.Val)
internal/planner/planner.go:2614
↓ 57 callersMethodv1
(method string, path string, body string, code int, resp string)
v1/server/server_test.go:5567
↓ 56 callersMethodGet
(key ast.Value)
v1/topdown/cache/cache.go:251
↓ 55 callersMethodNewTransaction
NewTransaction is called create a new transaction in the store.
v1/storage/interface.go:25
↓ 55 callersMethodappendInstr
(instr instruction.Instruction)
internal/compiler/wasm/wasm.go:1737
↓ 55 callersMethodlocal
(l ir.Local)
internal/compiler/wasm/wasm.go:1712
↓ 54 callersMethodBytes
Bytes returns a slice of the contents of the bit vector. If the caller changes the returned slice, the contents of the bit vector may change.
internal/edittree/bitvector/bitvector.go:42
↓ 54 callersMethodElem
(t *ast.Term)
v1/topdown/cache.go:263
↓ 54 callersFunctionNew
New returns a new Plugin with the given config.
v1/plugins/bundle/plugin.go:76
↓ 54 callersMethodNew
New creates a new JSON loader for the given source
internal/gojsonschema/jsonLoader.go:89
↓ 53 callersFunctionMustMarshalJSON
MustMarshalJSON returns the JSON encoding of x If the data cannot be encoded, this function will panic. This function is for test purposes.
v1/util/json.go:76
↓ 53 callersFunctionassertParseError
(t *testing.T, msg string, input string, opts ...ParserOptions)
v1/ast/parser_test.go:8309
↓ 52 callersMethodClose
(context.Context)
v1/storage/interface.go:62
↓ 52 callersMethodURL
URL returns the base URL of the server.
v1/sdk/test/test.go:130
↓ 51 callersMethodEntries
Entries returns buffered log entries.
v1/logging/test/test.go:90
↓ 51 callersMethodErr
()
v1/topdown/eval_test.go:1577
↓ 51 callersMethodWithRegoVersion
(ast.RegoVersion)
v1/loader/loader.go:108
↓ 51 callersFunctioneval
(args []string, params evalCommandParams, w io.Writer, stderr io.Writer)
cmd/eval.go:375
↓ 51 callersFunctionmakeDataBundle
(n int, s string)
v1/plugins/discovery/discovery_test.go:3337
↓ 51 callersMethodreset
()
v1/server/server_test.go:5625
↓ 50 callersFunctionCompare
Compare returns an integer indicating whether two AST values are less than, equal to, or greater than each other. If a is less than b, the return val
v1/ast/compare.go:40
↓ 50 callersFunctionNewHead
NewHead returns a new Head object. If args are provided, the first will be used for the key and the second will be used for the value.
v1/ast/policy.go:790
↓ 50 callersMethodType
Type returns the type of the variable.
v1/debug/variable.go:21
↓ 50 callersFunctionWalk
Walk iterates the AST by calling the Visit function on the [Visitor] v for x before recursing. Deprecated: use [GenericVisitor.Walk]
v1/ast/visit.go:97
↓ 49 callersMethodClient
Client returns a client for communicating with a remote service.
v1/plugins/plugins.go:1226
↓ 49 callersFunctionNew
New returns a new compiler instance that can be invoked.
v1/compile/compile.go:95
↓ 49 callersFunctionNew
New returns a new Client for config.
v1/plugins/rest/rest.go:191
↓ 49 callersMethodPop
Pop pops the top frame of value mappings from the stack, removing all associated entries.
v1/topdown/cache.go:23
↓ 49 callersFunctioncompileStages
compileStages is a helper function to run compiler up to a given stage. If stageID is empty, a normal full compile run is performed. This works direct
v1/ast/compile_test.go:11713
← previousnext →101–200 of 11,070, ranked by callers