Skip to main content

Crate gaman

Crate gaman 

Source
Expand description

Native database execution, filesystem integration, and CLI APIs for Gaman.

The root crate connects the database-I/O-free gaman-core lifecycle to migration sources, live database executors, inspection, and user-facing commands. Offline-only builds re-export the core planning API.

Modules§

cli
Command-line parsing, validation, dispatch, diagnostics, and presentation.
core
Lower-level APIs for custom executors, sources, and integration work.
drift
Semantic drift reports, contracts, comparison, and formatting.
parsers
runner_factory
Native adapters that construct the shared core command runner.
schema
Schema types and builders.
schema_file
Native schema file loading helpers.

Structs§

CommandDiagnostic
Serializable host-facing diagnostic derived from one CommandError.
CommandEnvelope
Versioned portable command request envelope.
CommandFailure
Versioned portable command failure with optional clarification payload.
CommandResponse
Versioned portable command response envelope.
Config
Runtime configuration for gaman. Loaded once at startup and passed through the call chain.
DatabaseTrackingStore
Database-backed migration tracking implemented through the active executor.
EmbeddedMigrations
Migration
A single migration: an ordered, dependency-aware set of operations. id is derived from the filename at load time and is not stored in the file.
MigrationArtifact
Canonical migration content for offline presentation.
MigrationCatalog
Immutable, validated migration history observed by one lifecycle command.
MigrationEngine
I/O-free migration lifecycle engine over caller-provided storage and execution adapters.
MigrationMovement
Counts forward and backward migration movement.
MigrationRunner
Unified lifecycle façade shared by native, WASM, and other host adapters.
MigrationStatus
One migration id and its tracked application state.
OfflinePlanner
RepairOptions
Options that control one-off drift repair.
RepairReport
Result of planning or applying one-off repair SQL.
SchemaCheckResult
Database preparation outcome for one supplied SQL source.
SqlInput
One in-memory SQL source supplied by a host for database preparation.

Enums§

ApplyCommand
Requested migration-application behavior.
CommandResult
Structured result of one lifecycle command.
ConfigError
Errors returned when runtime configuration is internally inconsistent.
DiagnosticCode
Stable command failure categories shared by non-Rust hosts.
EngineError
Errors returned by [MigrationEngine].
ExecutorError
Errors returned by a caller-owned SQL executor.
InspectionError
Failure returned by a host-provided schema inspector.
MakeCommand
Requested migration-generation behavior.
MakeResult
Outcome of migration generation with persistence semantics preserved for hosts.
OfflineError
RunnerCommand
Resolved lifecycle command accepted by [MigrationRunner].
RunnerCommandError
Structured semantic or host-adapter failure from runner command execution.
SchemaCheckFailure
One structured SQL schema validation failure.
SchemaCheckInput
One host-resolved input participating in SQL schema validation.
SchemaCheckStatus
Result category for one schema-check input.
TlsMode

Constants§

COMMAND_PROTOCOL_VERSION
Current version of the portable command request and response protocol.

Traits§

Executor
Executes SQL and transactional migration boundaries for a caller-owned target.
SchemaInspector
Reflects high-fidelity schema state from a live target without defining drift policy.
TrackingStore
Stores the applied migration IDs for a target environment.

Type Aliases§

CommandRequest
Portable command vocabulary used by textual, WASM, and other hosts.