Skip to main content

Crate ahri_tre_app

Crate ahri_tre_app 

Source
Expand description

Workflow-facing application services for AHRI TRE.

ahri_tre_app coordinates metadata repositories, lake adapters, source SQL analysis, and authentication/session inputs into user-facing operations. It deliberately keeps concrete PostgreSQL, DuckDB, and OAuth wiring behind adapter crates so workflows can depend on a stable application boundary.

Re-exports§

pub use error::AppError;
pub use error::RegistrationResource;
pub use service::AcquisitionAuthorization;
pub use service::AppRepositories;
pub use service::AppService;
pub use service::AuthenticatedDataStoreSession;
pub use service::acquire_ingest_file_content;
pub use session::DataStoreSession;
pub use session::SessionMetadataRepositories;
pub use session::StoreSessionConnection;
pub use sql_source::SqlSourceConnection;
pub use access_request::*;
pub use projections::*;
pub use query::*;
pub use requests::*;

Modules§

access_request
Study access-request submission workflow and its application port. Study access-request workflows.
disclosure
Trusted disclosure workflow and evidence coordination. SQL and ledger mechanics remain with metadata and Lake adapters, respectively.
error
Application-level error type.
projections
Projection helpers for public protocol DTOs.
query
Lake query request planning and authorization.
requests
Request and response data transfer types for application workflows.
service
The main application service facade.
session
Datastore session construction and repository grouping.
sql_source
External SQL source analysis and import preparation.

Structs§

BrowserDataFileDiscoverySourceRecord
BrowserDataFileMetadataSource
Narrow Datafile facts allowed to cross from the runtime adapter into the application workflow. Storage, digest, key, content, and preview facts cannot be represented here.
BrowserDataFileVersionDiscoverySourceRecord
BrowserDatasetDiscoverySourceRecord
BrowserDatasetVersionDiscoverySourceRecord
BrowserDatastoreDiscoveryError
Safe failure exposed by a browser Datastore discovery capability.
BrowserDictionaryDiscoverySource
Metadata-only source values required to project one browser dictionary.
BrowserDictionaryVariableCatalogueRecord
Catalogue search record carrying the domain name used by name predicates.
BrowserDictionaryVariableDiscoverySourceRecord
Adapter-owned source metadata for one browser-visible dictionary variable.
BrowserDomainSourceRecord
BrowserDomainVariableSourceRecord
BrowserProvenanceSummarySourceRecord
Runtime-owned provenance input from which the app builds the browser-safe projection.
BrowserResourceDiscoverySource
BrowserSemanticCatalogDiscoverySource
BrowserSemanticEntityCatalogueRecord
BrowserSemanticEntitySourceRecord
BrowserSemanticRelationCatalogueRecord
BrowserSemanticRelationSourceRecord
BrowserStudyDiscoverySource
BrowserStudyDiscoverySourceRecord
BrowserVocabularyDiscoverySourceRecord
Adapter-owned vocabulary metadata and visible items.
BrowserVocabularyMappingDiscoverySourceRecord
Adapter-owned source values for one vocabulary mapping.
BrowserVocabularyMappingSourceRecord
BrowserVocabularySource
ConfiguredDatastoreCreationProvisioner
Production PostgreSQL and DuckLake adapter implementation of the creation saga.
ConfiguredSessionReference
CreatedCatalogCredential
Safe metadata for the binding-owned credential created during the saga.
DatastoreCreationFailure
DatastoreReachability
Safe result of reaching one identity-bound Datastore through a live Session.
GovernanceUpgradeProgress
One resumable operator batch. Safe metadata remains available while any of these prerequisites is pending; ordinary Session opens cannot invoke it.
LakeReachability
Safe DuckLake readiness facts returned by the application workflow.
LiveSessionIdentifier
Opaque public identifier paired with one process-ephemeral live Session.
MetadataStoreReachability
Safe PostgreSQL readiness facts returned by the application workflow.
OpenConfiguredDatastoreRequest
Already-resolved authority required to open one configured Datastore.
PendingConfiguredDatastoreCreation
PrivilegedDatastoreCreationHandler
Authenticated handler that turns logical create intent into one durable saga.
ResolvedCreationStorageSecret
One storage Secret paired with the exact configured reference that authorized it.
SessionObservations
Holds only the latest authentication, metadata and Lake observations. Clones belong to the same live Session, including its admitted background work.
StagedCatalogCredential
Protected stage carried only by the Datastore credential owner workflow.

Enums§

ArchiveMode
Controls whether delete operations must archive records before removal.
BrowserDataFileWorkflowError
BrowserDatasetWorkflowError
BrowserDictionaryDiscoveryError
Closed workflow failures returned by browser dictionary discovery.
BrowserDictionaryDiscoveryResourceTarget
Adapter-resolved resource identity used to build the public resource reference.
BrowserDomainDiscoveryError
BrowserProvenanceCatalogueSourceRecord
A direction-neutral public catalogue target resolved behind the metadata adapter.
BrowserResourceDiscoveryError
BrowserSemanticCatalogDiscoveryError
BrowserStudyDiscoveryError
BrowserStudyWorkflowError
BrowserVariableWorkflowError
Failures returned by the browser variable-search workflow.
ConfiguredDatastoreOpenError
Failure opening a configured Datastore for an authenticated Session.
DatastoreCreationStart
DeleteTarget
Domain object targeted by an archive/delete request.
TagAttachmentTarget

Constants§

BROWSER_DICTIONARY_DISCOVERY_AUTHORITY
Stable authority label emitted by browser dictionary discovery responses.
BROWSER_DISCOVERY_AUTHORITY
BROWSER_RESOURCE_DISCOVERY_AUTHORITY
BROWSER_SEMANTIC_CATALOG_DISCOVERY_AUTHORITY
BROWSER_STUDY_DISCOVERY_AUTHORITY

Traits§

BrowserDatastoreDiscoveryCapability
Adapter capability accepted by the app-owned discovery workflow.
BrowserDictionaryDiscoveryCapability
Read-only capability required by browser dictionary discovery and search.
BrowserDomainDiscoveryCapability
Metadata-only capability consumed by Domain and Vocabulary browser workflows.
BrowserResourceDiscoveryCapability
Resolved adapter capability used by the application-owned resource discovery and catalogue-search workflows.
BrowserSemanticCatalogDiscoveryCapability
BrowserStudyDiscoveryCapability
Resolved adapter capability used by the application-owned Study workflow.
DatastoreCreationAuthority
Trusted authority retained by the handler. Clients never receive these capabilities.
DatastoreCreationProvisioner
Adapter-owned phases of the cross-store creation saga.
DatastoreSecretResolver
Trusted operation capability that resolves only the binding-owned catalog credential.

Functions§

browser_datafile_search_response
browser_dataset_search_response
browser_dictionary_discovery_response
Projects adapter-owned metadata into the stable browser dictionary DTO.
browser_dictionary_variable_search_response
Filters, orders, pages, and projects browser-visible variable metadata.
browser_model_entity_search_response
browser_model_relation_search_response
browser_resource_discovery_response
browser_semantic_catalog_discovery_response
browser_study_discovery_response
browser_study_facts
browser_study_get_response
browser_study_search_response
discover_browser_dictionary
Discovers and projects one resource dictionary through a resolved capability.
discover_browser_ready_datastores
Discovers the configured browser Datastore through an already-resolved adapter capability and returns only safe stable DTOs.
discover_browser_resources
discover_browser_studies
discover_browser_study
get_browser_domain
get_browser_domain_variable
get_browser_vocabulary
inspect_datastore_session
Probes PostgreSQL and DuckLake through the capabilities retained by one already-authorized Session. Configuration, Secret stores, and topology are neither reopened nor projected by this workflow.
key_role_label
Returns the stable protocol label for a variable key role.
list_browser_domain_studies
list_browser_domain_variables
list_browser_domains
list_browser_vocabulary_items
list_browser_vocabulary_mappings
observe_browser_workflow
Runs one Browser workflow with explicit child context for its resolved capability.
open_configured_datastore
Opens one configured Datastore from resolved runtime authority without requiring an otherwise unrelated application repository set.
open_configured_datastore_for_session
Opens a Datastore while preserving OAuth authentication rejection.
open_configured_datastore_for_session_observed
Times the app workflow using its already authorized inputs and resolver.
open_configured_datastore_with_observations
Runs the existing open workflow while retaining its actual adapter evidence.
open_operation_control
Opens only PostgreSQL under current user authority; never attaches Lake or resolves its Secrets.
project_browser_ready_datastores
Projects adapter-owned operational discovery into the stable browser-safe response without exposing topology, credentials, or maintenance states.
reconcile_configured_dataset_operations
Startup maintenance for a configured Datastore, before the listener schedules user work. Missing/unavailable Datastores are retried on explicit Session open. No Session, user identity, Current study, or output admission is created here.
resolve_file_asset_encryption
Resolves a File Asset encryption choice independently of DuckLake catalog encryption, defaulting new File Assets to encrypted storage.
resource_discovery_failure_response
search_browser_datafiles
search_browser_datasets
search_browser_model_entities
search_browser_model_relations
search_browser_studies
search_browser_variables
Searches browser-visible dictionary variables with stable cursor semantics.
semantic_catalog_discovery_failure_response
variable_record
Projects one adapter source record into its browser-safe variable DTO.