Context schema and validation for interceptor pipelines.
Defines the structure and validation rules for the context map that flows through interceptor pipelines, ensuring consistent data flow and preventing common runtime errors.
Context schema and validation for interceptor pipelines. Defines the structure and validation rules for the context map that flows through interceptor pipelines, ensuring consistent data flow and preventing common runtime errors.
(add-breadcrumb context category action details)Adds a breadcrumb for observability tracking.
Adds a breadcrumb for observability tracking.
(add-effect-error context effect error)Adds an effect execution error to the context.
Adds an effect execution error to the context.
(add-validation-error context error-key error-details)Adds a validation error to the context.
Adds a validation error to the context.
Complete schema for interceptor context.
Complete schema for interceptor context.
(context-summary context)Creates a summary of context for debugging purposes.
Creates a summary of context for debugging purposes.
(create-cli-context op system args options)Creates context for CLI command processing.
Creates context for CLI command processing.
(create-http-context op system request)Creates context for HTTP request processing.
Creates context for HTTP request processing.
(create-initial-context op system & {:keys [request correlation-id tenant]})Creates a properly structured initial context for pipeline execution.
Creates a properly structured initial context for pipeline execution.
(create-service-context op system data & {:keys [correlation-id]})Creates context for internal service calls.
Creates context for internal service calls.
Default mapping of exception types to HTTP status codes and titles.
Default mapping of exception types to HTTP status codes and titles.
Schema for side effect execution errors.
Schema for side effect execution errors.
(fail-with-exception context exception)Marks context as failed and associates an exception.
Marks context as failed and associates an exception.
(get-correlation-id context)Extracts correlation ID from context.
Extracts correlation ID from context.
(get-error-reporter context)Extracts error reporter from system dependencies.
Extracts error reporter from system dependencies.
(get-interface-type context)Gets the interface type from context (:http, :cli, :service).
Gets the interface type from context (:http, :cli, :service).
(get-logger context)Extracts logger from system dependencies.
Extracts logger from system dependencies.
(get-metrics context)Extracts metrics collector from system dependencies.
Extracts metrics collector from system dependencies.
(get-operation context)Safely extracts operation from context.
Safely extracts operation from context.
(get-request-data context)(get-request-data context key-path)Safely extracts request data from context.
Safely extracts request data from context.
(get-response context)Extracts response from context.
Extracts response from context.
(get-result context)(get-result context key-path)Extracts result from context.
Extracts result from context.
(get-service context)Gets the service/user-service from system dependencies.
Gets the service/user-service from system dependencies.
(get-system-dependency context dependency-key)Safely extracts system dependency from context.
Safely extracts system dependency from context.
(get-timing context)(get-timing context timing-key)Extracts timing information from context.
Extracts timing information from context.
(halted? context)Checks if pipeline execution should be halted.
Args: context: Interceptor context map
Returns: Boolean indicating halt flag status
Checks if pipeline execution should be halted. Args: context: Interceptor context map Returns: Boolean indicating halt flag status
(has-errors? context)Checks if context contains validation or domain errors.
Args: context: Interceptor context map
Returns: Boolean indicating error presence
Checks if context contains validation or domain errors. Args: context: Interceptor context map Returns: Boolean indicating error presence
(has-result? context)Checks if context contains a result from core function execution.
Args: context: Interceptor context map
Returns: Boolean indicating result presence
Checks if context contains a result from core function execution. Args: context: Interceptor context map Returns: Boolean indicating result presence
(merge-context context additional-data)Safely merges additional data into context.
Safely merges additional data into context.
(record-end-time context)Records operation end time and calculates duration.
Records operation end time and calculates duration.
(record-start-time context)Records operation start time in nanoseconds.
Records operation start time in nanoseconds.
Schema for request data (HTTP, CLI, or service call).
Schema for request data (HTTP, CLI, or service call).
(sanitize-context-for-logging context)Removes sensitive data from context for safe logging.
Removes sensitive data from context for safe logging.
(success? context)Checks if the operation was successful based on result status.
Args: context: Interceptor context map
Returns: Boolean indicating operation success
Checks if the operation was successful based on result status. Args: context: Interceptor context map Returns: Boolean indicating operation success
Schema for the system dependency injection map.
Schema for the system dependency injection map.
(update-timing context timing-key value)Updates timing information in context.
Updates timing information in context.
(validate-context context)Validates context map against schema. Returns {:valid? true :data context} or {:valid? false :errors [...]}.
Validates context map against schema.
Returns {:valid? true :data context} or {:valid? false :errors [...]}.(validate-context! context)Validates context and throws exception if invalid.
Validates context and throws exception if invalid.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |