MCPcopy Create free account

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

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

↓ 49 callersFunctionloadSmallTestData
loadSmallTestData returns base documents that are referenced throughout the topdown test suite. Avoid the following top-level keys: i, j, k, p, q, r,
v1/topdown/topdown_test.go:1995
↓ 49 callersMethodlog
(name string)
v1/plugins/bundle/plugin.go:768
↓ 48 callersMethodClone
(value InterQueryCacheValue)
v1/topdown/cache/cache.go:256
↓ 48 callersMethodListPolicies
(context.Context, Transaction)
v1/storage/interface.go:152
↓ 48 callersFunctionNew
New returns a new OPA object. This function should minimally be called with options that specify an OPA configuration file.
v1/sdk/opa.go:66
↓ 48 callersMethodWithFS
(fs.FS)
v1/loader/loader.go:97
↓ 47 callersMethodGetConfig
GetConfig returns a deep copy of the manager's configuration.
v1/plugins/plugins.go:693
↓ 47 callersMethodOpen
Opens a file with the given name
internal/gojsonschema/jsonLoader.go:121
↓ 47 callersMethodPath
()
v1/storage/inmem/txn.go:421
↓ 47 callersMethodPlug
Plug plugs event bindings into the provided ast.Term. Because bindings are mutable, this only makes sense to do when the event is emitted rather than
v1/topdown/trace.go:148
↓ 47 callersMethodStop
(context.Context)
v1/plugins/logs/plugin.go:471
↓ 47 callersFunctionformatErrorDescription
formatErrorDescription takes a string in the default text/template format and converts it to a string with replacements. The fields come from the Erro
internal/gojsonschema/errors.go:334
↓ 46 callersMethodGetPolicy
(context.Context, Transaction, string)
v1/storage/interface.go:153
↓ 46 callersFunctionNew
New returns an empty in-memory store.
v1/storage/inmem/inmem.go:35
↓ 46 callersFunctionNewErrorV1
NewErrorV1 returns a new ErrorV1 object.
v1/server/types/types.go:138
↓ 46 callersFunctionNewOperandTypeErr
NewOperandTypeErr returns an operand error indicating the operand's type was wrong.
v1/topdown/builtins/builtins.go:129
↓ 46 callersFunctionStore
Store returns an argument that sets the policy engine's data storage layer. If using the Load, LoadBundle, or ParsedBundle options then a transaction
v1/rego/rego.go:1111
↓ 45 callersFunctionByteSliceToString
Allocation free conversion from []byte to string (unsafe) Note that the byte slice must not be modified after conversion
v1/util/performance.go:62
↓ 45 callersMethodDone
()
v1/topdown/eval_test.go:1589
↓ 45 callersMethodIter
(func(*Term) error)
v1/ast/term.go:1808
↓ 44 callersMethodDecision
Decision returns a named decision. This function is threadsafe.
v1/sdk/opa.go:300
↓ 44 callersFunctionNewBufferTracer
NewBufferTracer returns a new BufferTracer.
v1/topdown/trace.go:224
↓ 44 callersMethodString
()
v1/util/test/tempus.go:45
↓ 44 callersMethodWriteHeader
(statusCode int)
v1/server/handlers/compress.go:97
↓ 44 callersFunctionassertTermEqual
(t *testing.T, x *Term, y *Term)
v1/ast/term_test.go:1425
↓ 43 callersFunctionMustInterfaceToValue
MustInterfaceToValue converts a native Go value x to a Value. If the conversion fails, this function will panic. This function is mostly for test purp
v1/ast/term.go:306
↓ 43 callersFunctionNewGenericVisitor
NewGenericVisitor returns a new GenericVisitor that will invoke the function f on AST nodes. Note that while it returns a pointer, the creating a Gene
v1/ast/visit.go:490
↓ 43 callersMethodillegal
(note string, a ...any)
v1/ast/parser.go:2874
↓ 42 callersMethodForeach
(func(*Term))
v1/ast/term.go:1810
↓ 42 callersFunctionInput
Input returns an argument that sets the Rego input document. Input should be a native Go value representing the input document.
v1/rego/rego.go:968
↓ 42 callersMethodPush
Push pushes a new, empty frame of value mappings onto the stack.
v1/topdown/cache.go:20
↓ 42 callersFunctionwrapError
(err error)
v1/storage/disk/errors.go:13
↓ 41 callersMethodWithCapabilities
(*ast.Capabilities)
v1/loader/loader.go:104
↓ 41 callersMethodWithPaths
WithPaths adds input filepaths to read policy and data from.
v1/compile/compile.go:190
↓ 40 callersFunctionCallTerm
CallTerm returns a new Term with a Call value defined by terms. The first term is the operator and the rest are operands.
v1/ast/term.go:3049
↓ 40 callersMethodEval
(context.Context, Input)
v1/resolver/interface.go:16
↓ 40 callersMethodHandle
(_ context.Context, r slog.Record)
v1/logging/slog.go:33
↓ 40 callersMethodWithMetrics
(metrics.Metrics)
v1/loader/loader.go:98
↓ 40 callersFunctionassertNotFailed
(t *testing.T, c *Compiler)
v1/ast/compile_test.go:11685
↓ 40 callersMethoderr
(errs ...*Error)
v1/ast/compile.go:2038
↓ 40 callersFunctionrunTopDownTestCase
(t *testing.T, data map[string]any, note string, rules []string, expected any, options ...func(*Query) *Query)
v1/topdown/topdown_test.go:2083
↓ 39 callersFunctionGet
Get returns the standard logger used throughout OPA. Deprecated. Do not rely on the global logger.
v1/logging/logging.go:75
↓ 39 callersFunctionNewSet
NewSet returns a new Set type.
v1/types/types.go:273
↓ 39 callersFunctionOr
Or returns a type that represents the union of a and b. If one type is a superset of the other, the superset is returned unchanged.
v1/types/types.go:1002
↓ 39 callersFunctionParseModule
ParseModule returns a parsed Module object. For details on Module objects and their fields, see policy.go. Empty input will return nil, nil.
v1/ast/parser_ext.go:475
↓ 39 callersFunctionnewTestStore
()
v1/repl/repl_test.go:3385
↓ 38 callersMethodAsBundle
(path string)
v1/loader/loader.go:95
↓ 38 callersMethodInt64
()
v1/metrics/metrics.go:211
↓ 38 callersFunctionNewVarSet
NewVarSet returns a new VarSet containing the specified variables.
v1/ast/varset.go:18
↓ 38 callersMethodURL
URL string representation for the current server. Requires that the server has already been started.
v1/test/e2e/logs/utils.go:103
↓ 38 callersMethodaddInternalError
(err ResultError, context *JSONContext, value any, details ErrorDetails)
internal/gojsonschema/result.go:206
↓ 37 callersFunctionNewReader
NewReader is deprecated. Use NewCustomReader instead.
v1/bundle/bundle.go:505
↓ 37 callersFunctionNewWriter
NewWriter returns a bundle writer that writes to w.
v1/bundle/bundle.go:916
↓ 37 callersFunctionnewrepeatedStringFlag
(val []string)
cmd/eval.go:778
↓ 36 callersFunctionCompiler
Compiler returns an argument that sets the Rego compiler.
v1/rego/rego.go:1100
↓ 36 callersFunctionIsNotFound
IsNotFound returns true if this error is a NotFoundErr.
v1/storage/errors.go:58
↓ 36 callersMethodIter
(func(*ast.Term) error)
v1/topdown/builtins/builtins.go:289
↓ 36 callersFunctionJSON
JSON returns the JSON representation of v. The value must not contain any refs or terms that require evaluation (e.g., vars, comprehensions, etc.)
v1/ast/term.go:275
↓ 36 callersMethodNext
()
v1/debug/trace.go:16
↓ 36 callersMethodSetLevel
(Level)
v1/logging/logging.go:39
↓ 36 callersFunctionWithTestFS
WithTestFS creates a temporary file system of `files` in memory if `inMemoryFS` is true and invokes `f“ with that filesystem
v1/util/test/tempfs.go:74
↓ 36 callersFunctiongetTestManager
()
v1/plugins/bundle/plugin_test.go:4075
↓ 36 callersMethodnext
()
v1/ast/internal/scanner/scanner.go:557
↓ 35 callersFunctionNew
New returns a new standard logger.
v1/logging/logging.go:66
↓ 35 callersFunctionNewRuntime
NewRuntime returns a new Runtime object initialized with params. Clients must call StartServer() or StartREPL() to start the runtime in either mode.
v1/runtime/runtime.go:365
↓ 35 callersFunctionNewVerificationConfig
NewVerificationConfig return a new VerificationConfig
v1/bundle/keys.go:39
↓ 35 callersFunctionRefHead
RefHead returns a new Head object with the passed Ref. If args are provided, the first will be used for the value.
v1/ast/policy.go:819
↓ 35 callersMethodRun
Run executes all tests contained in supplied modules. Deprecated: Use RunTests and the Runner#SetModules or Runner#SetBundles helpers instead. This w
v1/tester/runner.go:448
↓ 35 callersMethodUpdate
(int64)
v1/metrics/metrics.go:259
↓ 35 callersMethodWalk
Walk iterates the AST by calling the function f on the GenericVisitor before recursing. Contrary to the generic Walk, this does not require allocating
v1/ast/visit.go:497
↓ 35 callersFunctionnewTypeChecker
newTypeChecker returns a new typeChecker object that has no errors.
v1/ast/check.go:35
↓ 34 callersMethodConfig
()
v1/topdown/trace.go:186
↓ 34 callersFunctionError
Error writes a response with specified status and error response.
v1/server/writer/writer.go:51
↓ 34 callersMethodIs
Is allows matching topdown errors using errors.Is (see IsCancel).
v1/topdown/errors.go:74
↓ 34 callersFunctionNewOperandErr
NewOperandErr returns a generic operand error.
v1/topdown/builtins/builtins.go:123
↓ 34 callersFunctionTarget
Target sets the runtime to exercise.
v1/rego/rego.go:1337
↓ 34 callersFunctionnewTestFixture
(t *testing.T, opts ...fixtureOpt)
v1/download/testharness.go:38
↓ 34 callersMethodoneShot
(ctx context.Context, u download.Update)
v1/plugins/discovery/discovery.go:334
↓ 33 callersFunctionEventually
FIXME: Abort long running tests
v1/util/test/tempus.go:15
↓ 33 callersFunctionMap
Map builds an OrderedMap from alternating key/value arguments. Keys must be strings; the function panics on an odd number of arguments or on a non-str
internal/genjsonschema/genjsonschema.go:446
↓ 33 callersMethodRemove
()
v1/storage/inmem/txn.go:422
↓ 33 callersMethodmermaidFormat
(b *mermaidBuilder)
v1/ast/mermaid.go:19
↓ 33 callersFunctionmustActivate
(tb testing.TB, store storage.Store, opts *ActivateOpts)
v1/bundle/store_test.go:4428
↓ 33 callersFunctiontestBenchParams
()
cmd/bench_test.go:1509
↓ 32 callersMethodAppend
Append returns a copy of ref with the term appended to the end.
v1/ast/term.go:1252
↓ 32 callersFunctionNew
New creates a new mock Store
internal/storage/mock/mock.go:73
↓ 32 callersFunctionNewParams
NewParams returns a new Params object.
v1/runtime/runtime.go:324
↓ 32 callersFunctionNewStringLoader
NewStringLoader creates a new JSONLoader, taking a string as source
internal/gojsonschema/jsonLoader.go:265
↓ 32 callersFunctionNewTarballLoaderWithBaseURL
NewTarballLoaderWithBaseURL returns a new DirectoryLoader that reads files out of a gzipped tar archive. The file URLs will be prefixed with the baseU
v1/bundle/file.go:302
↓ 32 callersFunctionOptReturnASTValuesOnRead
OptReturnASTValuesOnRead sets whether data values added to the store should be eagerly converted to AST values, which are then returned on read. When
v1/storage/inmem/opts.go:33
↓ 32 callersMethodQueryCompiler
()
v1/ast/compile.go:652
↓ 32 callersMethodResult
()
v1/debug/trace.go:17
↓ 32 callersMethodValid
Valid indicates if no errors were found
internal/gojsonschema/result.go:185
↓ 32 callersMethodValidateAndInjectDefaults
ValidateAndInjectDefaults checks for configuration errors and ensures all values are set on the Config object.
v1/download/config.go:43
↓ 32 callersMethodnode
node writes a Mermaid node declaration and returns its ID. Supported shapes: "rect" (default), "round", "hex", "cyl", "stadium", "trap".
v1/ast/mermaid.go:35
↓ 32 callersMethodplanTerm
(t *ast.Term, iter planiter)
internal/planner/planner.go:1529
↓ 32 callersFunctionwriteByte
(w io.Writer, b byte)
internal/wasm/encoding/writer.go:773
↓ 31 callersMethodAdd
Add updates the set to include the variable "v".
v1/ast/varset.go:32
↓ 31 callersMethodAppendText
(buf []byte)
v1/ast/policy_appenders.go:89
↓ 31 callersMethodClear
()
v1/metrics/metrics.go:58
← previousnext →201–300 of 11,070, ranked by callers