package
1.2.0
Repository: https://github.com/open-policy-agent/opa.git
Documentation: pkg.go.dev

# Packages

Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended.
Package test contains utilities used in the policy engine's test suite.

# Functions

Backoff returns a delay with an exponential backoff based on the number of retries.
BFS performs a breadth first traversal calling f for each node starting from u.
Close reads the remaining bytes from the response and then closes it to ensure that the connection is freed.
Compare returns 0 if a equals b, -1 if a is less than b, and 1 if b is than a.
DefaultBackoff returns a delay with an exponential backoff based on the number of retries.
DFS performs a depth first traversal calling f for each node starting from u.
DFSPath returns a path from node a to node z found by performing a depth first traversal.
MustMarshalJSON returns the JSON encoding of x If the data cannot be encoded, this function will panic.
MustUnmarshalJSON parse the JSON encoded data and returns the result.
NewEnumFlag returns a new EnumFlag that has a defaultValue and vs enumerated values.
NewFIFO returns a new FIFO queue containing elements ts starting with the left-most argument at the front.
NewHashMap returns a new empty HashMap.
NewJSONDecoder returns a new decoder that reads from r.
NewLIFO returns a new LIFO queue containing elements ts starting with the left-most argument at the bottom.
Note(philipc): Originally taken from server/server.go The DecodingLimitHandler handles validating that the gzip payload is within the allowed max size limit.
Reference returns a pointer to its argument unless the argument already is a pointer.
RoundTrip encodes to JSON, and decodes the result again.
TimerWithCancel exists because of memory leaks when using time.After in select statements.
Unmarshal decodes a YAML, JSON or JSON extension value into the specified type.
UnmarshalJSON parses the JSON encoded data and stores the result in the value pointed to by x.
Values returns a slice of values from any map.
WaitFunc will call passed function at an interval and return nil as soon this function returns true.

# Type aliases

EnumFlag implements the pflag.Value interface to provide enumerated command line parameter values.
Equals should return true if node "u" equals node "v".
FIFO represents a simple FIFO queue.
HashMap represents a key/value map.
Iter should return true to indicate stop.
LIFO represents a simple LIFO queue.
T is a concise way to refer to T.
Traversal defines a basic interface to perform traversals.