Skip to main content

Module ops_bridge

Module ops_bridge 

Source
Expand description

Exposes the ops_bridge runtime module.

§Examples

ⓘ
use pharos_native::runtime::ops_bridge;
  • crate::runtime for sibling modules in the same crate. Native operational helpers migrated from the runtime ops and helper surfaces.

The functions are deliberately data- and filesystem-only. They do not spawn shell commands, interpolate untrusted SQL, or write outside caller-selected roots.

Functions§

append_app_common_flags
Appends the shared app flags to an owned argv vector in stable order.
append_escaped_sql_char
Appends one SQL-literal character with the escaping required by SQLite and PostgreSQL.
build_app_deploy_check_report_local_json
Builds a bounded deployment-check report from declarative metadata.
build_app_doctor_report_local_json
Builds a bounded drift report from two JSON documents.
build_app_drift_report_local_json
Builds app drift report local JSON.
capture_trimmed
Trims a captured command-like value while rejecting control characters.
cleanup_temp_body_file
Removes a temporary request body and clears its ownership slot.
command_exists
Checks whether an executable is available on PATH without invoking it.
conninfo_append
Appends one validated key/value pair to PostgreSQL connection information.
conninfo_append_kv
Appends an escaped key/value pair to PostgreSQL conninfo text.
cross_deb_packaging_available
Returns whether a deployment packaging directory is present and usable.
db_check_json
Reports whether a SQLite database path is readable and regular.
default_backend
Resolves an explicitly configured database backend.
default_environment
Returns the default native execution environment.
environment_valid
Validates a supported runtime environment name.
http_body_limit
Resolves the configured HTTP body limit with a bounded default.
identifier_safe
Returns whether text is safe for an identifier position.
long_from_value
Converts a JSON scalar into a bounded signed integer.
match_ops_command
Matches the native operational command tuple exactly enough for dispatch.
normalize_base_path
Normalizes an app-relative base path without allowing traversal.
open_libpq_handle_candidate
Returns whether a configured PostgreSQL adapter handle candidate is usable.
output_path_check_json
Checks one output path and returns its bounded JSON disposition.
output_path_status
Returns a bounded JSON description of one output path.
push_argv_value
Appends one owned argument while enforcing a fixed command-vector bound.
resolve_runtime_path
Returns a path under a trusted root for a validated relative helper value.
runtime_script_path
Fails closed for the retired shell runtime bridge; Rust dispatch owns behavior directly.
shell_runtime_command_capture
Fails closed for the retired shell runtime bridge; Rust dispatch owns behavior directly.
spool_request_body_to_temp_file
Spools a bounded request body to a caller-selected temporary path.
sql_literal_escape
Escapes a value for a SQL string literal without constructing a query.
write_access_log
Writes access log.
write_error_log
Appends one bounded access-log line to a runtime-owned log file.
write_noindex_markers_recursive
Writes macOS-compatible no-index markers to a directory tree.
write_temp_body_file
Writes a bounded request body to a uniquely-created temporary file.