Documentation ¶
Index ¶
- func ComputeBulkCheck(ctx context.Context, d dispatch.Check, params CheckParameters, ...) (map[string]*v1.ResourceCheckResult, *v1.ResponseMeta, error)
- func ComputeCheck(ctx context.Context, d dispatch.Check, params CheckParameters, ...) (*v1.ResourceCheckResult, *v1.ResponseMeta, error)
- type CheckParameters
- type DebugOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeBulkCheck ¶
func ComputeBulkCheck( ctx context.Context, d dispatch.Check, params CheckParameters, resourceIDs []string, ) (map[string]*v1.ResourceCheckResult, *v1.ResponseMeta, error)
ComputeBulkCheck computes a check result for the given resources and subject, computing any caveat expressions found.
func ComputeCheck ¶
func ComputeCheck( ctx context.Context, d dispatch.Check, params CheckParameters, resourceID string, ) (*v1.ResourceCheckResult, *v1.ResponseMeta, error)
ComputeCheck computes a check result for the given resource and subject, computing any caveat expressions found.
Types ¶
type CheckParameters ¶
type CheckParameters struct { ResourceType *core.RelationReference Subject *core.ObjectAndRelation CaveatContext map[string]any AtRevision datastore.Revision MaximumDepth uint32 DebugOption DebugOption }
CheckParameters are the parameters for the ComputeCheck call. *All* are required.
type DebugOption ¶ added in v1.16.0
type DebugOption int
DebugOption defines the various debug level options for Checks.
const ( // NoDebugging indicates that debug information should be retained // while performing the Check. NoDebugging DebugOption = 0 // BasicDebuggingEnabled indicates that basic debug information, such // as which steps were taken, should be retained while performing the // Check and returned to the caller. // // NOTE: This has a minor performance impact. BasicDebuggingEnabled DebugOption = 1 // TraceDebuggingEnabled indicates that the Check is being issued for // tracing the exact calls made for debugging, which means that not only // should debug information be recorded and returned, but that optimizations // such as batching should be disabled. // // WARNING: This has a fairly significant performance impact and should only // be used in tooling! TraceDebuggingEnabled DebugOption = 2 )
Click to show internal directories.
Click to hide internal directories.