Documentation
¶
Index ¶
- type Engine
- func (e *Engine) MatchesEvaluation(_ context.Context, _ *engine.Policy, _ []string, _ map[string]string) (bool, error)
- func (e *Engine) MatchesParameters(_ context.Context, _ *engine.Policy, _, _ map[string]string) (bool, error)
- func (e *Engine) Verify(ctx context.Context, policy *engine.Policy, input []byte, args map[string]any) (*engine.EvaluationResult, error)
- type ErrorCategory
- type PolicyError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// Embed common engine options
*engine.CommonEngineOptions
// contains filtered or unexported fields
}
Engine implements the PolicyEngine interface for WASM policies
func (*Engine) MatchesEvaluation ¶
func (e *Engine) MatchesEvaluation(_ context.Context, _ *engine.Policy, _ []string, _ map[string]string) (bool, error)
MatchesEvaluation is a stub implementation for WASM policies WASM policies don't currently support evaluation matching
type ErrorCategory ¶
type ErrorCategory string
ErrorCategory represents the type of WASM policy error
const ( CategoryHTTPForbidden ErrorCategory = "http_forbidden" CategoryTimeout ErrorCategory = "timeout" CategoryMemory ErrorCategory = "memory" CategoryPanic ErrorCategory = "panic" CategoryUnknown ErrorCategory = "unknown" )
type PolicyError ¶
type PolicyError struct {
Category ErrorCategory
UserMessage string
Hint string
OriginalErr error
}
PolicyError represents a parsed WASM policy error with user-friendly messaging
func (*PolicyError) Error ¶
func (e *PolicyError) Error() string
Error implements the error interface for PolicyError
Click to show internal directories.
Click to hide internal directories.